diff --git a/carnot/carnot.py b/carnot/carnot.py index 6999441..8ab9577 100644 --- a/carnot/carnot.py +++ b/carnot/carnot.py @@ -201,10 +201,6 @@ def download(view) -> Block: raise NotImplementedError -def build_timeout_qc(msgs) -> TimeoutQc: - pass - - class Carnot: def __init__(self, _id: Id): self.id: Id = _id @@ -318,7 +314,7 @@ class Carnot: for child_committee in self.overlay.child_of_root_committee(): self.send(timeout_msg, child_committee) - def timeout(self, msgs: Set["Timeout"]): + def timeout(self, msgs: Set[Timeout]): assert len(msgs) == self.overlay.super_majority_threshold(self.id) assert all(msg.view == msgs.pop().view for msg in msgs) assert msgs.pop().view > self.current_view @@ -326,12 +322,12 @@ class Carnot: if self.local_high_qc.view < max_msg.high_qc.view: self.update_high_qc(max_msg.high_qc) if self.overlay.member_of_root_committee(self.id) and self.overlay.member_of_leaf_committee(self.id): - timeout_qc = build_timeout_qc(msgs) + timeout_qc = self.build_timeout_qc(msgs) self.update_timeout_qc(timeout_qc) else: self.update_timeout_qc(msgs.pop().timeout_qc) - def timeout_qc(self,timeout_qc: TimeoutQc): + def build_timeout_qc(self, msgs: Set[Timeout]) -> TimeoutQc: pass def send(self, vote: Vote | Timeout, *ids: Id):