Treat some invalid objects as received
- update to 6044df5adf
- objects that are expired or in wrong stream are not re-requested
anymore, even if they aren't stored in the inventory
- the previous option "acceptmismatch" now only affects whether such
objects are stored in the inventory
This commit is contained in:
parent
f78f1a718b
commit
a9c0000c17
|
@ -278,12 +278,17 @@ class BMProto(AdvancedDispatcher, ObjectTracker):
|
|||
self.object.checkProofOfWorkSufficient()
|
||||
try:
|
||||
self.object.checkEOLSanity()
|
||||
except BMObjectExpiredError:
|
||||
if not BMConfigParser().get("inventory", "acceptmismatch"):
|
||||
raise
|
||||
try:
|
||||
self.object.checkStream()
|
||||
except BMObjectUnwantedStreamError:
|
||||
except (BMObjectExpiredError, BMObjectUnwantedStreamError):
|
||||
for connection in BMConnectionPool().inboundConnections.values() + BMConnectionPool().outboundConnections.values():
|
||||
try:
|
||||
del connection.objectsNewtoThem[hashId]
|
||||
except KeyError:
|
||||
pass
|
||||
try:
|
||||
del connection.objectsNewToMe[hashId]
|
||||
except KeyError:
|
||||
pass
|
||||
if not BMConfigParser().get("inventory", "acceptmismatch"):
|
||||
raise
|
||||
self.object.checkAlreadyHave()
|
||||
|
|
Reference in New Issue
Block a user