Skip to main content

evaluate_key_evidence_with_holder_check

Function evaluate_key_evidence_with_holder_check 

Source
pub fn evaluate_key_evidence_with_holder_check(
    key: &XorName,
    evidence: &KeyVerificationEvidence,
    targets: &VerificationTargets,
    config: &ReplicationConfig,
    holder_credit: impl Fn(&PeerId, &XorName) -> bool,
) -> KeyVerificationOutcome
Expand description

Variant of evaluate_key_evidence that consults a holder-credit predicate before counting a peer’s Present evidence (v12 §6).

holder_credit is invoked as (peer, key) -> bool. Returning false downgrades a Present claim to Unresolved (we don’t trust this peer’s “I have it” without a recent commitment-bound audit proving it). Returning true keeps today’s behaviour. Paid-list evidence is independent of holder credit (the paid-list lookup is a property of the receiving peer’s own data, not a claim about K being present).

The non-_with_holder_check form preserves prior behaviour by passing a predicate that always returns true. New call sites that have a RecentProvers cache + commitment-by-peer table should pass a real predicate.