Function zebra_state::service::read::find::best_relevant_chain

source ·
fn best_relevant_chain(
    non_finalized_state: &NonFinalizedState,
    db: &ZebraDb
) -> Result<Vec<Arc<Block>>, BoxError>
Expand description

Do a consistency check by checking the finalized tip before and after all other database queries.

Returns recent blocks in reverse height order from the tip. Returns an error if the tip obtained before and after is not the same.

§Panics

  • If we don’t have enough blocks in the state.