avoid resetting chain stall detection on lag spike (#6115)
During lag spike, e.g., from state replays, peer count can temporarily drop significantly. Should not have to wait another 60 minutes in that situation just to be back where one started.
This commit is contained in:
parent
d66a769135
commit
3d45c0575a
|
@ -258,10 +258,9 @@ proc syncStatus*(node: BeaconNode, head: BlockRef): ChainSyncStatus =
|
|||
|
||||
let numPeers = len(node.network.peerPool)
|
||||
if numPeers <= node.config.maxPeers div 4:
|
||||
# We may have poor connectivity, wait until more peers are available
|
||||
warn "Chain appears to have stalled, but have low peers",
|
||||
numPeers, maxPeers = node.config.maxPeers
|
||||
node.dag.resetChainProgressWatchdog()
|
||||
# We may have poor connectivity, wait until more peers are available.
|
||||
# This could also be intermittent, as state replays while chain is degraded
|
||||
# may take significant amounts of time, during which many peers are lost
|
||||
return ChainSyncStatus.Syncing
|
||||
|
||||
let
|
||||
|
|
Loading…
Reference in New Issue