pub(crate) fn safe_block<K: KVStore>(
block: &Block,
block_tree: &BlockTreeSingleton<K>,
chain_id: ChainID,
) -> Result<bool, BlockTreeError>Expand description
Check whether block can safely cause updates to block_tree, given the replica’s chain_id.
§Conditional checks
safe_block returns true in case all of the following predicates are true:
safe_pc(&block.justify, block_tree, chain_id).block.pc.phaseis eitherGenericorDecide.
§Precondition
is_correct is true for block.