Skip to main content

checkpoint_floor

Function checkpoint_floor 

Source
pub fn checkpoint_floor(
    chain_tip: Option<BlockHeight>,
    last_scanned_height: BlockHeight,
) -> BlockHeight
Expand description

The checkpoint floor of a batch of scanned blocks ending at last_scanned_height: the height at and below which no block end of the batch keeps its own checkpoint.

Checkpoint retention is used only within PRUNING_DEPTH blocks of the later of chain_tip (the wallet’s view of the chain tip, if known) and last_scanned_height. A block-end checkpoint below that window would be pruned as soon as the window advanced, so such a commitment keeps only the marking that protects a wallet note. Retained anchor heights are checkpointed regardless (keeps_checkpoint).