Revert the useless async change for queryRandom (#432)

This commit is contained in:
Kim De Mey 2021-11-22 23:14:37 +01:00 committed by GitHub
parent 086162183c
commit 84f755d792
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -718,9 +718,9 @@ proc query*(d: Protocol, target: NodeId, k = BUCKET_SIZE): Future[seq[Node]]
d.lastLookup = now(chronos.Moment) d.lastLookup = now(chronos.Moment)
return queryBuffer return queryBuffer
proc queryRandom*(d: Protocol): Future[seq[Node]] {.async.} = proc queryRandom*(d: Protocol): Future[seq[Node]] =
## Perform a query for a random target, return all nodes discovered. ## Perform a query for a random target, return all nodes discovered.
return await d.query(NodeId.random(d.rng[])) d.query(NodeId.random(d.rng[]))
proc queryRandom*(d: Protocol, enrField: (string, seq[byte])): proc queryRandom*(d: Protocol, enrField: (string, seq[byte])):
Future[seq[Node]] {.async.} = Future[seq[Node]] {.async.} =