Skip to main content

apply_roots

Function apply_roots 

Source
pub fn apply_roots(
    base_slot: u64,
    base_buffer: &mut [[u8; 32]],
    delta: &ArchivedRootsDiff,
)
Expand description

Applies a root delta to a circular root buffer.

Each stored root is written back into the destination buffer using the same slot-to-index mapping employed during diff generation.

After application, the destination buffer contains the same root values for every slot represented by the delta.

ยงComplexity

O(number of recorded roots)