pub(crate) fn block_is_valid_for_recent_chain(
semantically_verified: &SemanticallyVerifiedBlock,
network: &Network,
finalized_tip_height: Option<Height>,
relevant_chain: Iter<Header>,
) -> 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 headers, including previous height and block difficulty.
The relevant chain is an iterator over the ancestor headers of block, starting
with its parent. Its initial height comes from the parent hash’s state index.