Wanted peers log message fix (#2114)
* Edit Peer count low wanted peers log * remove prometheus folder * remove prometheus.yml * Add current peers to low peer count log * change to 25% peer count notice, 12.5% warning Co-authored-by: kdeme <kim.demey@gmail.com>
This commit is contained in:
parent
92655f936a
commit
94c66f15a9
|
@ -913,10 +913,15 @@ proc runDiscoveryLoop*(node: Eth2Node) {.async.} =
|
|||
new_peers = newPeers
|
||||
|
||||
if newPeers == 0:
|
||||
if node.peerPool.lenCurrent() <= node.wantedPeers shr 2:
|
||||
warn "Less than 25% wanted peers and could not discover new nodes",
|
||||
discovered = len(discoveredNodes), new_peers = newPeers,
|
||||
wanted_peers = node.wantedPeers
|
||||
let currentPeers = node.peerPool.lenCurrent()
|
||||
if currentPeers <= node.wantedPeers shr 2: # 25%
|
||||
notice "Peer count low, no new peers discovered",
|
||||
discovered = len(discoveredNodes), new_peers = newPeers,
|
||||
current_peers = currentPeers, wanted_peers = node.wantedPeers
|
||||
elif currentPeers <= node.wantedPeers shr 3: # 12.5 %
|
||||
warn "Peer count low, no new peers discovered",
|
||||
discovered = len(discoveredNodes), new_peers = newPeers,
|
||||
current_peers = currentPeers, wanted_peers = node.wantedPeers
|
||||
await sleepAsync(5.seconds)
|
||||
else:
|
||||
await sleepAsync(1.seconds)
|
||||
|
|
Loading…
Reference in New Issue