Merge 4ff42762fd into merged_master (Bitcoin PR bitcoin/bitcoin#28336)

This commit is contained in:
ivanlele 2026-02-20 09:34:54 +00:00
commit 12bbc09a42
No known key found for this signature in database
7 changed files with 23 additions and 42 deletions

View file

@ -154,18 +154,14 @@ static RPCHelpMan createmultisig()
},
[&](const RPCHelpMan& self, const JSONRPCRequest& request) -> UniValue
{
int required = request.params[0].getInt<int>();
int required = request.params[0].getInt<int>();
// Get the public keys
const UniValue& keys = request.params[1].get_array();
std::vector<CPubKey> pubkeys;
for (unsigned int i = 0; i < keys.size(); ++i) {
if (IsHex(keys[i].get_str()) && (keys[i].get_str().length() == 66 || keys[i].get_str().length() == 130)) {
// Get the public keys
const UniValue& keys = request.params[1].get_array();
std::vector<CPubKey> pubkeys;
for (unsigned int i = 0; i < keys.size(); ++i) {
pubkeys.push_back(HexToPubKey(keys[i].get_str()));
} else {
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, strprintf("Invalid public key: %s\n.", keys[i].get_str()));
}
}
// Get the output type
OutputType output_type = OutputType::LEGACY;