Skip to main content

audit_tick

Function audit_tick 

Source
pub async fn audit_tick(
    p2p_node: &Arc<P2PNode>,
    storage: &Arc<LmdbStorage>,
    config: &ReplicationConfig,
    sync_history: &HashMap<PeerId, PeerSyncRecord>,
    bootstrap_claims: &HashMap<PeerId, Instant>,
    is_bootstrapping: bool,
) -> AuditTickResult
Expand description

Execute one audit tick (Section 15 steps 2-9).

Returns the audit result. Caller is responsible for emitting trust events.

Invariant 19: Returns AuditTickResult::Idle immediately if is_bootstrapping is true — a node must not audit others while it is still bootstrapping.