MCPcopy Create free account
hub / github.com/ChainSafe/Delorean-Protocol / empty

Method empty

fendermint/vm/topdown/src/voting.rs:78–85  ·  view source on GitHub ↗

Create an uninitialized instance. Before blocks can be added to it we will have to set the last finalized block. The reason this exists is so that we can delay initialization until after the genesis block has been executed.

()

Source from the content-addressed store, hash-verified

76 /// The reason this exists is so that we can delay initialization until
77 /// after the genesis block has been executed.
78 pub fn empty() -> Self {
79 Self {
80 power_table: TVar::default(),
81 chain: TVar::default(),
82 votes: TVar::default(),
83 pause_votes: TVar::new(false),
84 }
85 }
86
87 /// Initialize the vote tally from the current power table
88 /// and the last finalized block from the ledger.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected