diff --git a/src/descriptor/sortedmulti.rs b/src/descriptor/sortedmulti.rs index b63b8edcc..2725ecd28 100644 --- a/src/descriptor/sortedmulti.rs +++ b/src/descriptor/sortedmulti.rs @@ -46,7 +46,7 @@ impl SortedMultiVec { pub fn new(k: usize, pks: Vec) -> Result { // A sortedmulti() is only defined for <= 20 keys (it maps to CHECKMULTISIG) if pks.len() > MAX_PUBKEYS_PER_MULTISIG { - Error::BadDescriptor("Too many public keys".to_string()); + return Err(Error::BadDescriptor("Too many public keys".to_string())); } // Check the limits before creating a new SortedMultiVec