From d0027ba63ae159ea36d6a1b9c09cb8db81076083 Mon Sep 17 00:00:00 2001 From: mjalalzai <33738574+MForensic@users.noreply.github.com> Date: Wed, 27 Sep 2023 21:01:48 -0700 Subject: [PATCH] update timeout_qc --- carnot/carnot-vote-aggregation.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/carnot/carnot-vote-aggregation.py b/carnot/carnot-vote-aggregation.py index 7886832..e613c07 100644 --- a/carnot/carnot-vote-aggregation.py +++ b/carnot/carnot-vote-aggregation.py @@ -281,3 +281,8 @@ class Carnot: # If my view is not updated, I update it when I see a QC for that view if qc.view >= self.current_view: self.current_view = qc.view + 1 + + def update_timeout_qc(self, timeout_qc: TimeoutQc): + if not self.last_view_timeout_qc or timeout_qc.view > self.last_view_timeout_qc.view: + self.last_view_timeout_qc = timeout_qc +