Add peers to backfill if FullySynced

This commit is contained in:
dapplion
2025-06-12 19:41:20 +02:00
parent aa726cc72c
commit cb5f76f137

View File

@@ -416,7 +416,6 @@ impl<T: BeaconChainTypes> SyncManager<T> {
PeerSyncType::Advanced => { PeerSyncType::Advanced => {
self.range_sync self.range_sync
.add_peer(&mut self.network, local, peer_id, remote); .add_peer(&mut self.network, local, peer_id, remote);
self.backfill_sync.add_peer(peer_id);
} }
PeerSyncType::FullySynced => { PeerSyncType::FullySynced => {
// Sync considers this peer close enough to the head to not trigger range sync. // Sync considers this peer close enough to the head to not trigger range sync.
@@ -434,6 +433,13 @@ impl<T: BeaconChainTypes> SyncManager<T> {
} }
} }
} }
match sync_type {
PeerSyncType::Behind => {}
PeerSyncType::Advanced | PeerSyncType::FullySynced => {
self.backfill_sync.add_peer(peer_id);
}
}
} }
self.update_sync_state(); self.update_sync_state();