We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ebdaec7 commit 40a8b65Copy full SHA for 40a8b65
src/musig.rs
@@ -314,6 +314,10 @@ impl KeyAggCache {
314
///
315
/// Panics if an empty slice of pubkeys is provided.
316
pub fn new<C: Verification>(secp: &Secp256k1<C>, pubkeys: &[&PublicKey]) -> Self {
317
+ if pubkeys.is_empty() {
318
+ panic!("Cannot aggregate an empty slice of pubkeys");
319
+ }
320
+
321
let cx = secp.ctx().as_ptr();
322
323
let mut key_agg_cache = MaybeUninit::<ffi::MusigKeyAggCache>::uninit();
0 commit comments