mirror of
https://github.com/codex-storage/nim-codex-dht.git
synced 2025-02-14 12:57:21 +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