Code a method to determine the activation block before any block has consensus

[0; 32] is a magic for no block has been set yet due to this being the first
key pair. If [0; 32] is the latest finalized block, the processor determines
an activation block based on timestamps.

This doesn't use an Option for ergonomic reasons.
This commit is contained in:
Luke Parker
2023-04-18 03:04:52 -04:00
parent 9da0eb69c7
commit 396e5322b4
8 changed files with 105 additions and 47 deletions

View File

@@ -204,6 +204,10 @@ impl BlockTrait<Bitcoin> for Block {
hash
}
fn time(&self) -> u64 {
self.header.time.into()
}
fn median_fee(&self) -> Fee {
// TODO
Fee(20)