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
|
let
|
||||||
maxHeadSlot = node.dag.heads.foldl(max(a, b.slot), GENESIS_SLOT)
|
maxHeadSlot = node.dag.heads.foldl(max(a, b.slot), GENESIS_SLOT)
|
||||||
numPeersWithHigherProgress = node.network.peerPool.peers
|
numPeersWithHigherProgress = node.network.peerPool.peers
|
||||||
.countIt(it != nil and it.getHeadSlot() > maxHeadSlot)
|
.countIt(it.getHeadSlot() > maxHeadSlot)
|
||||||
significantNumPeers = node.config.maxPeers div 8
|
significantNumPeers = node.config.maxPeers div 8
|
||||||
if numPeersWithHigherProgress > significantNumPeers:
|
if numPeersWithHigherProgress > significantNumPeers:
|
||||||
# A peer indicates that they are on a later slot, wait for sync manager
|
# A peer indicates that they are on a later slot, wait for sync manager
|
||||||
|
|
Loading…
Reference in New Issue