mirror of
https://github.com/status-im/nimbus-eth2.git
synced 2025-02-02 01:36:06 +00:00
peers can no longer be nil
(#6151)
This commit is contained in:
parent
e4c4d11480
commit
2f91bc3be7
@ -285,7 +285,7 @@ proc syncStatus*(node: BeaconNode, head: BlockRef): ChainSyncStatus =
|
||||
let
|
||||
maxHeadSlot = node.dag.heads.foldl(max(a, b.slot), GENESIS_SLOT)
|
||||
numPeersWithHigherProgress = node.network.peerPool.peers
|
||||
.countIt(it != nil and it.getHeadSlot() > maxHeadSlot)
|
||||
.countIt(it.getHeadSlot() > maxHeadSlot)
|
||||
significantNumPeers = node.config.maxPeers div 8
|
||||
if numPeersWithHigherProgress > significantNumPeers:
|
||||
# A peer indicates that they are on a later slot, wait for sync manager
|
||||
|
Loading…
x
Reference in New Issue
Block a user