Skip to main content

ensure_checkpoints

Function ensure_checkpoints 

Source
pub fn ensure_checkpoints<'a, H, I: Iterator<Item = &'a BlockHeight>, const DEPTH: u8>(
    ensure_heights: I,
    existing_checkpoint_positions: &BTreeMap<BlockHeight, Position>,
    state_final_tree: &Frontier<H, DEPTH>,
) -> Vec<(BlockHeight, Checkpoint)>
Available on crate feature orchard only.
Expand description

Produces the checkpoints that must be added to a pool’s note commitment tree so that it gains a checkpoint at each of the requested heights, drawing position information from the existing checkpoint positions (or from the provided frontier when no preceding checkpoint exists). Heights at which a checkpoint already exists are skipped.