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.

For each key in replica_hints and paid_hints:

  • Cross-set precedence: if a key appears in both sets, keep only the replica-hint entry.
  • Replica hints: admitted if IsResponsible(self, K) or key already exists in local store / pending set.
  • Paid hints: admitted if self is in PaidCloseGroup(K) or key is already in PaidForList.

Returns an AdmissionResult with keys sorted into pipelines.