fn best_relevant_chain_and_history_tree(
    non_finalized_state: &NonFinalizedState,
    db: &ZebraDb
) -> Result<(Height, Hash, Vec<Arc<Block>>, Arc<HistoryTree>), BoxError>
Expand description

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

Returns the best chain tip, recent blocks in reverse height order from the tip, and the tip history tree. 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.