use _value_producer in peer_list
to match the downloader behavior
This commit is contained in:
parent
1d9705fb17
commit
33945e14d3
1 changed files with 4 additions and 3 deletions
|
@ -3169,9 +3169,10 @@ class Daemon(metaclass=JSONRPCServerType):
|
||||||
else:
|
else:
|
||||||
search_bottom_out_limit = 4
|
search_bottom_out_limit = 4
|
||||||
peers = []
|
peers = []
|
||||||
async for new_peers in self.dht_node.get_iterative_value_finder(unhexlify(blob_hash.encode()), max_results=1,
|
peer_q = asyncio.Queue(loop=self.component_manager.loop)
|
||||||
bottom_out_limit=search_bottom_out_limit):
|
await self.dht_node._value_producer(blob_hash, peer_q)
|
||||||
peers.extend(new_peers)
|
while not peer_q.empty():
|
||||||
|
peers.extend(peer_q.get_nowait())
|
||||||
results = [
|
results = [
|
||||||
{
|
{
|
||||||
"node_id": hexlify(peer.node_id).decode(),
|
"node_id": hexlify(peer.node_id).decode(),
|
||||||
|
|
Loading…
Reference in a new issue