Fixed request packet receipts timing out in spite of delivery.

This commit is contained in:
Mark Qvist 2021-08-28 23:53:51 +02:00
parent cdb08325cc
commit 781cb4712d
2 changed files with 4 additions and 1 deletions

View File

@ -440,7 +440,7 @@ class PacketReceipt:
return (self.sent_at+self.timeout < time.time())
def check_timeout(self):
if self.is_timed_out():
if self.status == PacketReceipt.SENT and self.is_timed_out():
if self.timeout == -1:
self.status = PacketReceipt.CULLED
else:

View File

@ -864,6 +864,9 @@ class Transport:
if receipt.hash == proof_hash:
receipt_validated = receipt.validate_proof_packet(packet)
else:
# TODO: This looks like it should actually
# be rewritten when implicit proofs are added.
# In case of an implicit proof, we have
# to check every single outstanding receipt
receipt_validated = receipt.validate_proof_packet(packet)