fix missing async
This commit is contained in:
parent
371df6e6c2
commit
add147b409
1 changed files with 1 additions and 1 deletions
|
@ -63,7 +63,7 @@ class SimpleMetrics:
|
||||||
# given everything is random, the odds of a peer having the same X prefix bits matching ours is roughly 1/(2^X)
|
# given everything is random, the odds of a peer having the same X prefix bits matching ours is roughly 1/(2^X)
|
||||||
# we use that to estimate the network size, see issue #3463 for related papers and details
|
# we use that to estimate the network size, see issue #3463 for related papers and details
|
||||||
amount = 20_000
|
amount = 20_000
|
||||||
with self.active_estimation_semaphore: # this is resource intensive, limit concurrency to 1
|
async with self.active_estimation_semaphore: # this is resource intensive, limit concurrency to 1
|
||||||
peers = await self.dht_node.peer_search(self.dht_node.protocol.node_id, count=amount, max_results=amount)
|
peers = await self.dht_node.peer_search(self.dht_node.protocol.node_id, count=amount, max_results=amount)
|
||||||
close_ids = [peer for peer in peers if peer.node_id[0] == self.dht_node.protocol.node_id[0]]
|
close_ids = [peer for peer in peers if peer.node_id[0] == self.dht_node.protocol.node_id[0]]
|
||||||
return web.json_response(
|
return web.json_response(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue