pub(crate) fn safe_pc<K: KVStore>(
    pc: &PhaseCertificate,
    block_tree: &BlockTreeSingleton<K>,
    chain_id: ChainID,
) -> Result<bool, BlockTreeError>Expand description
Check whether pc can safely cause updates to block_tree, given the replica’s chain_id.
§Conditional checks
safe_pc returns true in case all of the following predicates are true:
- Either 
pc.chain_idequalschain_id, orpcis the Genesis PC. - Either 
block_treecontainspc.block, orpcis the Genesis PC. - Either 
pc.viewis (strictly) greater thanblock_tree’slocked_pc.view, orpc.blockextends fromlocked_pc.block. - If 
pc.phaseisPrepare,Precommit,Commit, orDecide,pc.blockis a validator set updating block. Else, ifpc.phaseisGeneric,pc.blockis not a validator set updating block. 
§Precondition
is_correct is true for block.justify.