Skip to main content

any_sapling_tree

Function any_sapling_tree 

Source
pub fn any_sapling_tree<'a, C: AsRef<Chain> + 'a>(
    chains: impl Iterator<Item = &'a C>,
    db: &ZebraDb,
    hash: Hash,
) -> Option<Arc<NoteCommitmentTree>>
Expand description

Returns the Sapling NoteCommitmentTree for the block with hash, if it exists in any of the non-finalized chains or finalized db.

Unlike sapling_tree, this checks every non-finalized chain (best chain first, then side chains), so it is immune to reorgs that move a block from the best chain onto a still-retained side chain.