peers can no longer be `nil` (#6151)

This commit is contained in:
Etan Kissling 2024-03-28 01:42:20 +01:00
parent e4c4d11480
commit 2f91bc3be7
No known key found for this signature in database
GPG Key ID: B21DA824C5A3D03D
1 changed files with 1 additions and 1 deletions

View File

@ -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