Function zebra_state::service::check::legacy_chain

source ·
pub(crate) fn legacy_chain<I>(
    nu5_activation_height: Height,
    ancestors: I,
    network: &Network,
    max_legacy_chain_blocks: usize
) -> Result<(), BoxError>
where I: Iterator<Item = Arc<Block>>,
Expand description

Check if zebra is following a legacy chain and return an error if so.

nu5_activation_height should be NetworkUpgrade::Nu5.activation_height(network), and max_legacy_chain_blocks should be MAX_LEGACY_CHAIN_BLOCKS. They are only changed from the defaults for testing.