From efce293d71dde2269916c1f7dd9384b1b0d93e6f Mon Sep 17 00:00:00 2001 From: danielsanchezq Date: Mon, 3 Apr 2023 19:38:33 +0200 Subject: [PATCH] Fix timeout preconditions --- carnot/carnot.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/carnot/carnot.py b/carnot/carnot.py index 3784d25..2919394 100644 --- a/carnot/carnot.py +++ b/carnot/carnot.py @@ -325,8 +325,9 @@ class Carnot: def timeout(self, msgs: Set[Timeout]): assert len(msgs) == self.overlay.super_majority_threshold(self.id) + assert all(msg.view >= self.current_view for msg in msgs) assert len(set(msg.view for msg in msgs)) == 1 - assert msgs.pop().view > self.current_view + max_msg = self.get_max_timeout(msgs) if self.local_high_qc.view < max_msg.high_qc.view: self.update_high_qc(max_msg.high_qc)