From a746ba9da7ea51ab6fd308ee502d53307720efee Mon Sep 17 00:00:00 2001 From: Peter Surda Date: Fri, 20 Oct 2017 13:21:39 +0200 Subject: [PATCH] Stop downloading objects with insufficient PoW - object with insufficient PoW weren't correctly detected and it tried to download them over and over again --- src/network/bmproto.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/network/bmproto.py b/src/network/bmproto.py index 2469d6e4..a3f7d620 100644 --- a/src/network/bmproto.py +++ b/src/network/bmproto.py @@ -340,11 +340,11 @@ class BMProto(AdvancedDispatcher, ObjectTracker): logger.info('The payload length of this object is too large (%s bytes). Ignoring it.' % len(self.payload) - self.payloadOffset) raise BMProtoExcessiveDataError() - self.object.checkProofOfWorkSufficient() try: + self.object.checkProofOfWorkSufficient() self.object.checkEOLSanity() self.object.checkAlreadyHave() - except (BMObjectExpiredError, BMObjectAlreadyHaveError) as e: + except (BMObjectExpiredError, BMObjectAlreadyHaveError, BMObjectInsufficientPOWError) as e: BMProto.stopDownloadingObject(self.object.inventoryHash) raise e try: