Stop downloading objects with insufficient PoW
- object with insufficient PoW weren't correctly detected and it tried to download them over and over again
This commit is contained in:
parent
2d34e73648
commit
a746ba9da7
|
@ -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)
|
logger.info('The payload length of this object is too large (%s bytes). Ignoring it.' % len(self.payload) - self.payloadOffset)
|
||||||
raise BMProtoExcessiveDataError()
|
raise BMProtoExcessiveDataError()
|
||||||
|
|
||||||
self.object.checkProofOfWorkSufficient()
|
|
||||||
try:
|
try:
|
||||||
|
self.object.checkProofOfWorkSufficient()
|
||||||
self.object.checkEOLSanity()
|
self.object.checkEOLSanity()
|
||||||
self.object.checkAlreadyHave()
|
self.object.checkAlreadyHave()
|
||||||
except (BMObjectExpiredError, BMObjectAlreadyHaveError) as e:
|
except (BMObjectExpiredError, BMObjectAlreadyHaveError, BMObjectInsufficientPOWError) as e:
|
||||||
BMProto.stopDownloadingObject(self.object.inventoryHash)
|
BMProto.stopDownloadingObject(self.object.inventoryHash)
|
||||||
raise e
|
raise e
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user