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(