From 3a6289d2ce13d04361f888fd7e9dea9a4f66513f Mon Sep 17 00:00:00 2001 From: Joey Yandle Date: Fri, 13 Dec 2024 11:49:21 -0500 Subject: [PATCH] remove unwrap in signer state machine --- src/state_machine/signer/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/state_machine/signer/mod.rs b/src/state_machine/signer/mod.rs index 8306f8fb..e77161bb 100644 --- a/src/state_machine/signer/mod.rs +++ b/src/state_machine/signer/mod.rs @@ -387,7 +387,7 @@ impl Signer { let mut missing_public_shares = HashSet::new(); let mut missing_private_shares = HashSet::new(); let mut bad_public_shares = HashSet::new(); - let threshold: usize = self.threshold.try_into().unwrap(); + let threshold: usize = self.threshold.try_into()?; if let Some(dkg_end_begin) = &self.dkg_end_begin_msg { for signer_id in &dkg_end_begin.signer_ids { if let Some(shares) = self.dkg_public_shares.get(signer_id) {