Skip to main content

dedup_stripped_state

Function dedup_stripped_state 

Source
pub fn dedup_stripped_state(
    state: Vec<RawStrippedState>,
) -> Vec<RawStrippedState>
Expand description

Collapse a federated stripped-state array to one entry per state cell.

The array is state, so two entries sharing a cell are already malformed, and which one a consumer obeys is otherwise decided by its own pick strategy against an ordering the spec never gives.

A cell’s first full PDU wins, and only a cell holding no PDU keeps its first legacy entry. An entry naming no readable cell, missing either half, drops: it addresses no state, and reading a missing state_key as the empty one would let a non-state event occupy a real cell and displace it.