Skip to main content

reconcile_missing

Function reconcile_missing 

Source
pub async fn reconcile_missing(
    filter: Filter,
    local_items: Vec<(EventId, Timestamp)>,
    timeout: Duration,
) -> Result<HashSet<EventId>, String>
Expand description

Race every trusted relay exchanging negentropy fingerprints for filter, and return the union of event IDs that relays hold but we don’t.

local_items is our fingerprint set: (event_id, created_at) for everything we already possess. Each relay reports only the IDs absent from that set, so the union across relays is the complete missing set reachable from our trusted relays.

Every relay is drained (not just the first to respond): completeness beats latency here, and one relay may lack events another holds. Each relay is bounded by timeout.