mirror of https://github.com/status-im/nim-eth.git
Add TODO comments from review
This commit is contained in:
parent
b951ec45dc
commit
86bceaa5d8
|
@ -363,6 +363,8 @@ proc revalidateLoop(p: Protocol) {.async.} =
|
|||
await sleepAsync(rand(10 * 1000).milliseconds)
|
||||
let n = p.routingTable.nodeToRevalidate()
|
||||
if not n.isNil:
|
||||
# TODO: Should we do these in parallel and/or async to be certain of how
|
||||
# often nodes are revalidated?
|
||||
await p.revalidateNode(n)
|
||||
except CancelledError:
|
||||
trace "revalidateLoop canceled"
|
||||
|
|
|
@ -239,6 +239,7 @@ proc randomNodes*(r: RoutingTable, count: int): seq[Node] =
|
|||
# insignificant compared to the time it takes for the network roundtrips when connecting
|
||||
# to nodes.
|
||||
while len(seen) < count:
|
||||
# TODO: Is it important to get a better random source for these sample calls?
|
||||
let bucket = sample(r.buckets)
|
||||
if bucket.nodes.len != 0:
|
||||
let node = sample(bucket.nodes)
|
||||
|
|
Loading…
Reference in New Issue