Skip to main content

admit_hints

Function admit_hints 

Source
pub async fn admit_hints(
    self_id: &PeerId,
    replica_hints: &[XorName],
    paid_hints: &[XorName],
    p2p_node: &Arc<P2PNode>,
    config: &ReplicationConfig,
    storage: &Arc<LmdbStorage>,
    paid_list: &Arc<PaidList>,
    pending_keys: &HashSet<XorName>,
) -> AdmissionResult
Expand description

Admit neighbor-sync hints per Section 7.1 rules.

Every key – replica-hinted or paid-hinted – passes the same is_relevant gate. The hint set a key arrived on decides only whether the sender is recorded as claiming possession, which makes it a candidate fetch source; it does not decide admission, and it does not decide storage.

  • Cross-set precedence: a key in both sets is settled by the replica pass, so the paid pass skips it.

Returns an AdmissionResult with keys sorted into pipelines.