change revalidateLoop to use [RevalidateMax/2, RevalidateMax]

Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
This commit is contained in:
Csaba Kiraly 2023-05-10 11:50:52 +02:00
parent ab7edc0247
commit 7956898882
No known key found for this signature in database
GPG Key ID: 0FE274EE8C95166E
1 changed files with 1 additions and 1 deletions

View File

@ -937,7 +937,7 @@ proc revalidateLoop(d: Protocol) {.async.} =
## message.
try:
while true:
await sleepAsync(milliseconds(d.rng[].rand(RevalidateMax)))
await sleepAsync(milliseconds(RevalidateMax div 2 + d.rng[].rand(RevalidateMax div 2)))
echo d.localNode.address.get().port, ": ", d.nodesDiscovered()
let n = d.routingTable.nodeToRevalidate()
if not n.isNil: