Skip to main content

diff_queue

Function diff_queue 

Source
pub fn diff_queue(
    base_ssz: &[u8],
    target_ssz: &[u8],
    item_ssz_size: usize,
) -> QueueDiff
Expand description

Computes the delta between two serialized queue lists.

ยงAlgorithm

  1. Locates the first item of the target queue within the base queue only at valid item boundaries.
  2. Strictly validates that the remaining items in the base queue are exactly identical to the prefix of the target queue.
  3. If valid, emits QueueDiff::Fifo. If invalid, emits QueueDiff::FullReplacement.