From 103f1b0426695d3a88304c45c90d7c62e9f4f881 Mon Sep 17 00:00:00 2001 From: Navia Bheeman Date: Thu, 21 Dec 2023 12:27:29 +0530 Subject: [PATCH] review feedback - remove unreachable else case --- src/cli/setup/compute_sig.rs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/cli/setup/compute_sig.rs b/src/cli/setup/compute_sig.rs index 527c6c3f2..f24af630e 100644 --- a/src/cli/setup/compute_sig.rs +++ b/src/cli/setup/compute_sig.rs @@ -215,12 +215,8 @@ impl<'a> ComputeSigCommand { let hash = if let Some(ref block) = block { block.header.signature_hash().to_vec() - } else if xfield != XField::None { - xfield.signature_hash().unwrap().to_vec() } else { - return Err(Error::InvalidArgs( - "Either xfield or block is expected".to_string(), - )); + xfield.signature_hash().unwrap().to_vec() }; let signature = Vss::aggregate_and_verify_signature(