From 213b2c079e73f9d2804bc5cf2b86c829ebceb48b Mon Sep 17 00:00:00 2001 From: mjalalzai <33738574+MForensic@users.noreply.github.com> Date: Sun, 15 Oct 2023 12:58:11 -0700 Subject: [PATCH] Overlay --- carnot/carnot-vote-aggregation.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/carnot/carnot-vote-aggregation.py b/carnot/carnot-vote-aggregation.py index 844c951..578e56b 100644 --- a/carnot/carnot-vote-aggregation.py +++ b/carnot/carnot-vote-aggregation.py @@ -481,3 +481,10 @@ def receive_timeout_qc(self, timeout_qc: TimeoutQc): # Optionally, rebuild the overlay from the timeout QC # self.rebuild_overlay_from_timeout_qc(timeout_qc) + +def rebuild_overlay_from_timeout_qc(self, timeout_qc: TimeoutQc): + # Ensure the timeout QC view is greater than or equal to the current view + assert timeout_qc.view >= self.current_view, "Timeout QC view should be greater than or equal to current view" + + # Rebuild the overlay from scratch + self.overlay = Overlay()