From 5ebcbc6370bd6bf44cfd2b22ff97a6191d72495a Mon Sep 17 00:00:00 2001 From: Victor Shyba Date: Mon, 6 Dec 2021 11:34:09 -0300 Subject: [PATCH] fix missing async --- scripts/dht_node.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/dht_node.py b/scripts/dht_node.py index 8a5e18561..2686b0e9d 100644 --- a/scripts/dht_node.py +++ b/scripts/dht_node.py @@ -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) # we use that to estimate the network size, see issue #3463 for related papers and details 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) close_ids = [peer for peer in peers if peer.node_id[0] == self.dht_node.protocol.node_id[0]] return web.json_response(