mirror of
https://github.com/logos-blockchain/logos-blockchain-specs.git
synced 2026-01-07 15:43:07 +00:00
Fix timeout preconditions
This commit is contained in:
parent
9a65a7b9c5
commit
efce293d71
@ -325,8 +325,9 @@ class Carnot:
|
|||||||
|
|
||||||
def timeout(self, msgs: Set[Timeout]):
|
def timeout(self, msgs: Set[Timeout]):
|
||||||
assert len(msgs) == self.overlay.super_majority_threshold(self.id)
|
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 len(set(msg.view for msg in msgs)) == 1
|
||||||
assert msgs.pop().view > self.current_view
|
|
||||||
max_msg = self.get_max_timeout(msgs)
|
max_msg = self.get_max_timeout(msgs)
|
||||||
if self.local_high_qc.view < max_msg.high_qc.view:
|
if self.local_high_qc.view < max_msg.high_qc.view:
|
||||||
self.update_high_qc(max_msg.high_qc)
|
self.update_high_qc(max_msg.high_qc)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user