zebra_state::service::check::anchors

Function fetch_sprout_final_treestates

source
fn fetch_sprout_final_treestates(
    sprout_final_treestates: &mut HashMap<Root, Arc<NoteCommitmentTree>>,
    finalized_state: &ZebraDb,
    parent_chain: Option<&Arc<Chain>>,
    transaction: &Arc<Transaction>,
    tx_index_in_block: Option<usize>,
    height: Option<Height>,
)
Expand description

This function fetches and returns the Sprout final treestates from the state, so sprout_anchors_refer_to_treestates() can check Sprout final and interstitial treestates, without accessing the disk.

Sprout anchors may also refer to the interstitial output treestate of any prior JoinSplit within the same transaction; these are created on the fly in sprout_anchors_refer_to_treestates().