musig: Reject empty pubkey list in GetMuSig2KeyAggCache

This commit is contained in:
nervana21
2026-05-16 20:45:12 +01:00
parent b2a3ca3df9
commit 8ce84321ce
2 changed files with 10 additions and 0 deletions

View File

@@ -18,6 +18,10 @@ constexpr uint256 MUSIG_CHAINCODE{
static bool GetMuSig2KeyAggCache(const std::vector<CPubKey>& pubkeys, secp256k1_musig_keyagg_cache& keyagg_cache)
{
if (pubkeys.empty()) {
return false;
}
// Parse the pubkeys
std::vector<secp256k1_pubkey> secp_pubkeys;
std::vector<const secp256k1_pubkey*> pubkey_ptrs;