fix approve_new_view preconditions

This commit is contained in:
Giacomo Pasini 2023-05-02 18:02:53 +02:00
parent 346fc020d4
commit 3c91cecdc4
No known key found for this signature in database
GPG Key ID: FC08489D2D895D4B

View File

@ -524,7 +524,7 @@ class Carnot:
# newView.view == self.last_timeout_view_qc.view for member of root committee and its children because
# they have already created the timeout_qc. For other nodes newView.view > self.last_timeout_view_qc.view.
if self.last_view_timeout_qc is not None:
assert all(new_view.view >= self.last_view_timeout_qc.view for new_view in new_views)
assert all(new_view.view > self.last_view_timeout_qc.view for new_view in new_views)
assert all(new_view.timeout_qc.view == timeout_qc.view for new_view in new_views)
assert len(new_views) == self.overlay.super_majority_threshold(self.id)
assert all(self.overlay.is_member_of_child_committee(self.id, new_view.sender) for new_view in new_views)