mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-18 13:17:55 +02:00
Merge 4ff42762fd into merged_master (Bitcoin PR bitcoin/bitcoin#28336)
This commit is contained in:
commit
12bbc09a42
7 changed files with 23 additions and 42 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue