From 5492ab9081a26ef7a540eb61b1613aa38ce8a8c9 Mon Sep 17 00:00:00 2001 From: Victor Shyba Date: Fri, 13 Jul 2018 01:21:24 -0300 Subject: [PATCH 1/2] 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) From 7d09d1402f436844c7e9b8b12a46358a841440d7 Mon Sep 17 00:00:00 2001 From: Victor Shyba Date: Fri, 13 Jul 2018 01:23:51 -0300 Subject: [PATCH 2/2] changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9c5093573..79ba52f7a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,7 +14,7 @@ at anytime. ### Fixed * daemon cli spelling fixes - * + * high CPU usage when a stream is incomplete and the peers we're requesting from have no more blobs to send us ### Deprecated *