From 5492ab9081a26ef7a540eb61b1613aa38ce8a8c9 Mon Sep 17 00:00:00 2001 From: Victor Shyba Date: Fri, 13 Jul 2018 01:21:24 -0300 Subject: [PATCH] stop requesting peers which doesnt have a blob --- lbrynet/core/client/BlobRequester.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lbrynet/core/client/BlobRequester.py b/lbrynet/core/client/BlobRequester.py index 852942138..2e1dce2f1 100644 --- a/lbrynet/core/client/BlobRequester.py +++ b/lbrynet/core/client/BlobRequester.py @@ -354,6 +354,10 @@ class AvailabilityRequest(RequestHelper): log.debug("Received a response to the availability request") # save available blobs blob_hashes = response_dict['available_blobs'] + if not blob_hashes: + # should not send any more requests as it doesnt have any blob we need + self.peer.update_score(-10.0) + return True for blob_hash in blob_hashes: if blob_hash in request.request_dict['requested_blobs']: self.process_available_blob_hash(blob_hash, request)