mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-03 00:31:50 +00:00
Add peers to backfill if FullySynced
This commit is contained in:
@@ -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();
|
||||||
|
|||||||
Reference in New Issue
Block a user