pub(super) fn add_block(
        &mut self,
        block_hash: Hash,
        patch: Patch,
        txs: Vec<Hash>,
        proposer_id: ValidatorId,
    ) -> Option<&BlockState> {
        match self.blocks.entry(block_hash) {
            Entry::Occupied(..) => None,
            Entry::Vacant(e) => Some(e.insert(BlockState {
                hash: block_hash,
                patch: Some(patch),
                txs,
                proposer_id,
            })),
        }
    }
/// Adds block to the list of blocks for the current height. Returns `BlockState` if it is a
/// new block.
Adds block to the list of blocks for the current height. Returns `BlockState` if it is a
new block.
Adds block to the list of blocks for the current height . Returns ` BlockState ` if it is a new block .
pub(super) fn add_block(
        &mut self,
        block_hash: Hash,
        patch: Patch,
        txs: Vec<Hash>,
        proposer_id: ValidatorId,
    ) -> Option<&BlockState> {
        match self.blocks.entry(block_hash) {
            Entry::Occupied(..) => None,
            Entry::Vacant(e) => Some(e.insert(BlockState {
                hash: block_hash,
                patch: Some(patch),
                txs,
                proposer_id,
            })),
        }
    }
pub ( super ) fn add_block ( & mut self , block_hash : Hash , patch : Patch , txs : Vec < Hash > , proposer_id : ValidatorId , ) -> Option < & BlockState > { match self . blocks . entry ( block_hash ) { Entry :: Occupied ( .. ) => None , Entry :: Vacant ( e ) => Some ( e . insert ( BlockState { hash : block_hash , patch : Some ( patch ) , txs , proposer_id , } ) ) , } }
Adds block to the list of blocks for the current height.
Adds block to the list of blocks for the current height .
&mut self
block_hash
Hash
patch
Patch
txs
Vec<Hash>
proposer_id
ValidatorId
&mut self
block_hash
Hash
patch
Patch
txs
Vec<Hash>
proposer_id
ValidatorId