partition_active_and_inactive_nodes_with

Function partition_active_and_inactive_nodes_with 

Source
pub fn partition_active_and_inactive_nodes_with(
    nodes: &[LedgerNode],
    framing: CtbnbdlFramingDcs,
) -> (Vec<LedgerNode>, Vec<LedgerNode>)
Expand description

Partitions an ordered slice of LedgerNode entries into (active_nodes, inactive_nodes) preserving ascending node ID order in both output vectors.

Inactive nodes include:

  1. Any node targeted by an active 591 <new_id> l<old_id> (Supersedes) or 592 615 l<old_id> (Retracts) statement.
  2. All 591 (Supersedes) and 592 (Retracts) revision/retraction statements themselves.
  3. Any 610 l<has_a_id> <val> (Has value) or 584 l<has_a_id> 570 (Has a Preferred) statement whose subject has_a_id is inactive, or any 584 <subj> <prop> (prop != 570) statement that has no active 610 value statement.
  4. Any non-statement value node that is transitively referenced by an inactive statement and is not transitively referenced by any active statement.