Skip to main content

select_sync_batch

Function select_sync_batch 

Source
pub fn select_sync_batch(
    state: &mut NeighborSyncState,
    peer_count: usize,
    cooldown: Duration,
) -> Vec<PeerId>
Expand description

Select the next batch of peers for sync from the current cycle.

Rules 2-3: Scan forward from cursor, skip peers still under cooldown, fill up to peer_count slots.