update_ack_watermark takes seqnum, not record

This commit is contained in:
Brian Warner 2019-02-10 16:22:30 -08:00
parent bf25dc68cf
commit 2ec7b8e662
2 changed files with 4 additions and 4 deletions

View File

@ -60,9 +60,9 @@ class Inbound(object):
return True return True
return False return False
def update_ack_watermark(self, r): def update_ack_watermark(self, seqnum):
self._highest_inbound_acked = max(self._highest_inbound_acked, self._highest_inbound_acked = max(self._highest_inbound_acked,
r.seqnum) seqnum)
def handle_open(self, scid): def handle_open(self, scid):
if scid in self._open_subchannels: if scid in self._open_subchannels:

View File

@ -27,12 +27,12 @@ class InboundTest(unittest.TestCase):
self.assertFalse(i.is_record_old(r2)) self.assertFalse(i.is_record_old(r2))
self.assertFalse(i.is_record_old(r3)) self.assertFalse(i.is_record_old(r3))
i.update_ack_watermark(r1) i.update_ack_watermark(r1.seqnum)
self.assertTrue(i.is_record_old(r1)) self.assertTrue(i.is_record_old(r1))
self.assertFalse(i.is_record_old(r2)) self.assertFalse(i.is_record_old(r2))
self.assertFalse(i.is_record_old(r3)) self.assertFalse(i.is_record_old(r3))
i.update_ack_watermark(r2) i.update_ack_watermark(r2.seqnum)
self.assertTrue(i.is_record_old(r1)) self.assertTrue(i.is_record_old(r1))
self.assertTrue(i.is_record_old(r2)) self.assertTrue(i.is_record_old(r2))
self.assertFalse(i.is_record_old(r3)) self.assertFalse(i.is_record_old(r3))