From a9dae057ed12c17eb2dd3b63e1a231000c549f50 Mon Sep 17 00:00:00 2001 From: mjalalzai <33738574+MForensic@users.noreply.github.com> Date: Wed, 27 Sep 2023 16:47:08 -0700 Subject: [PATCH] update high_qc --- carnot/carnot-vote-aggregation.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/carnot/carnot-vote-aggregation.py b/carnot/carnot-vote-aggregation.py index 82536dd..bbfa792 100644 --- a/carnot/carnot-vote-aggregation.py +++ b/carnot/carnot-vote-aggregation.py @@ -271,12 +271,10 @@ class Carnot: case (None, new_qc) if isinstance(new_qc, AggregateQc): # Set local high QC to the high QC from the new AggregateQc self.local_high_qc = new_qc.high_qc() - case (old_qc, new_qc) if isinstance(old_qc, StandardQc) and isinstance(new_qc, - StandardQc) and new_qc.view > old_qc.view: + case (old_qc, new_qc) if isinstance(new_qc, StandardQc) and new_qc.view > old_qc.view: # Update local high QC if the new StandardQc has a higher view self.local_high_qc = new_qc - case (old_qc, new_qc) if isinstance(old_qc, AggregateQc) and isinstance(new_qc, - AggregateQc) and new_qc.high_qc().view != old_qc.view: + case (old_qc, new_qc) if isinstance(new_qc, AggregateQc) and new_qc.high_qc().view != old_qc.view and new_qc.view > old_qc.view: # Update local high QC if the view of the high QC in the new AggregateQc is different self.local_high_qc = new_qc.high_qc()