Skip to main content

is_prepared_chain_for

Function is_prepared_chain_for 

Source
fn is_prepared_chain_for(
    prepared: &Chain,
    block: &ContextuallyVerifiedBlock,
    parent_chain: &Chain,
) -> bool
Expand description

Returns true if prepared is parent_chain with a validated proposal for block on top.

A block’s hash commits to its ancestors, so two chains with the same block at a height have the same blocks below it. prepared can also have root blocks that parent_chain has finalized, but not the other way around, because it was built from an earlier best chain.