From 694aeab75c34c8e636aa30cd5344723bd7a3c6ac Mon Sep 17 00:00:00 2001 From: Victor Shyba Date: Wed, 29 Sep 2021 02:32:16 -0300 Subject: [PATCH] remove tried_for_this_blob so banned peers are retried for same blob --- lbry/blob_exchange/downloader.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/lbry/blob_exchange/downloader.py b/lbry/blob_exchange/downloader.py index 5a8c90a27..eb462f916 100644 --- a/lbry/blob_exchange/downloader.py +++ b/lbry/blob_exchange/downloader.py @@ -88,7 +88,6 @@ class BlobDownloader: if blob.get_is_verified(): return blob self.is_running.set() - tried_for_this_blob: typing.Set['KademliaPeer'] = set() try: while not blob.get_is_verified() and self.is_running.is_set(): batch: typing.Set['KademliaPeer'] = set(self.connections.keys()) @@ -102,8 +101,6 @@ class BlobDownloader: for peer in sorted(batch, key=lambda peer: self.scores.get(peer, 0), reverse=True): if peer in self.ignored: continue - if peer in tried_for_this_blob: - continue if peer in self.active_connections: if peer not in re_add: re_add.add(peer) @@ -113,7 +110,6 @@ class BlobDownloader: log.debug("request %s from %s:%i", blob_hash[:8], peer.address, peer.tcp_port) t = self.loop.create_task(self.request_blob_from_peer(blob, peer, connection_id)) self.active_connections[peer] = t - tried_for_this_blob.add(peer) if not re_add: self.peer_queue.put_nowait(list(batch)) await self.new_peer_or_finished()