hotstuff_rs::block_tree::invariants

Function repropose_block

source
pub(crate) fn repropose_block<K: KVStore>(
    current_view: ViewNumber,
    block_tree: &BlockTreeSingleton<K>,
) -> Result<Option<CryptoHash>, BlockTreeError>
Expand description

Get the Block in the block_tree which a leader of the current_view should re-propose in order to satisfy the Consecutive Views Rule and make progress in the view.

§Usage

If Ok(Some(block_hash)) is returned, then the leader should re-propose the block identified by block_hash.

Else if Ok(None) is returned, then the leader should either propose a new block, or nudge using the highest pc.

§Rationale

The Consecutive Views Rule and the purpose of repropose_block is explained in the “Committing” section of safety’s module-level docs.