From 50cb9930aede662dd8761c407c05567571eaef6d Mon Sep 17 00:00:00 2001 From: Al Liu Date: Thu, 21 Mar 2024 11:02:32 +0800 Subject: [PATCH] Update overlay.rs --- .../carnot-engine/src/overlay/tree_overlay/overlay.rs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/consensus/carnot-engine/src/overlay/tree_overlay/overlay.rs b/consensus/carnot-engine/src/overlay/tree_overlay/overlay.rs index 9a3e833a..8155238a 100644 --- a/consensus/carnot-engine/src/overlay/tree_overlay/overlay.rs +++ b/consensus/carnot-engine/src/overlay/tree_overlay/overlay.rs @@ -146,14 +146,10 @@ where if self.is_member_of_leaf_committee(id) { return 0; } - match self - .carnot_tree + self.carnot_tree .committee_by_member_id(&id) .map(|c| apply_threshold(c.len(), self.threshold)) - { - Some(threshold) => threshold, - None => panic!("node {id} is not part of any committee"), - } + .expect("node is not part of any committee") } // TODO: Carnot node in sim does not send votes to the next leader from the child committee of