Skip to main content

follow_leaves

Function follow_leaves 

Source
async fn follow_leaves<T>(
    storage: &Arc<T>,
    instance: &NodeState,
    provider: &LightClientProvider,
    parent_leaf: Leaf2,
    parent_state: ValidatedState,
)
where T: SequencerStateDataSource, for<'a> T::Transaction<'a>: SequencerStateUpdate,
Expand description

Apply every leaf above parent_leaf as it arrives. Leaves come from the local stream, except those the data pruner has already deleted: the availability layer never fetches a leaf at or below the data pruned height, so the stream would wait for one forever. Those come from peers, in runs. Returns when the stream ends, or when a leaf from peers does not extend the parent.