Skip to main content

handle_sync_failure

Function handle_sync_failure 

Source
pub fn handle_sync_failure(
    state: &mut NeighborSyncState,
    failed_peer: &PeerId,
    cooldown: Duration,
) -> Option<PeerId>
Expand description

Handle a failed sync attempt: remove peer from snapshot and try to fill the vacated slot.

Rule 3: Remove unreachable peer from NeighborSyncOrder, attempt to fill by resuming scan from where rule 2 left off. Applies the same cooldown filtering as select_sync_batch to avoid selecting a peer that was recently synced.