pub(crate) fn block_is_valid_for_recent_chain<C>(
    semantically_verified: &SemanticallyVerifiedBlock,
    network: &Network,
    finalized_tip_height: Option<Height>,
    relevant_chain: C
) -> Result<(), ValidateContextError>
Expand description

Check that the semantically verified block is contextually valid for network, based on the finalized_tip_height and relevant_chain.

This function performs checks that require a small number of recent blocks, including previous hash, previous height, and block difficulty.

The relevant chain is an iterator over the ancestors of block, starting with its parent block.