mirror of
https://github.com/logos-storage/logos-storage-nim-dht.git
synced 2026-01-05 15:03:10 +00:00
change revalidateLoop to use [RevalidateMax/2, RevalidateMax]
Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
This commit is contained in:
parent
c1f39a89c9
commit
9cd6af5afd
@ -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:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user