pub fn merge_frontier_head<H>(
frontier: &mut Vec<H>,
head: H,
stream_key: impl Fn(&H) -> CircleAuthorStreamKey,
seq: impl Fn(&H) -> u64,
)Expand description
Insert head into a frontier keyed by author stream, keeping the deeper
(higher-sequence) head when the stream already carries one. Merging every
conflicting branch’s heads this way yields the union frontier: each stream is
covered at its deepest position across all branches, so a device that authored
on that stream continues from its own head instead of re-allocating it.