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)
|
let numPeers = len(node.network.peerPool)
|
||||||
if numPeers <= node.config.maxPeers div 4:
|
if numPeers <= node.config.maxPeers div 4:
|
||||||
# We may have poor connectivity, wait until more peers are available
|
# We may have poor connectivity, wait until more peers are available.
|
||||||
warn "Chain appears to have stalled, but have low peers",
|
# This could also be intermittent, as state replays while chain is degraded
|
||||||
numPeers, maxPeers = node.config.maxPeers
|
# may take significant amounts of time, during which many peers are lost
|
||||||
node.dag.resetChainProgressWatchdog()
|
|
||||||
return ChainSyncStatus.Syncing
|
return ChainSyncStatus.Syncing
|
||||||
|
|
||||||
let
|
let
|
||||||
|
|
Loading…
Reference in New Issue