mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-25 10:43:19 -03:00
[RPC] Remove deprecated createmultisig object
This commit is contained in:
parent
ed45c82019
commit
cb28a0b07f
1 changed files with 1 additions and 11 deletions
|
@ -262,9 +262,6 @@ UniValue createmultisig(const JSONRPCRequest& request)
|
|||
std::string msg = "createmultisig nrequired [\"key\",...]\n"
|
||||
"\nCreates a multi-signature address with n signature of m keys required.\n"
|
||||
"It returns a json object with the address and redeemScript.\n"
|
||||
"DEPRECATION WARNING: Using addresses with createmultisig is deprecated. Clients must\n"
|
||||
"transition to using addmultisigaddress to create multisig addresses with addresses known\n"
|
||||
"to the wallet before upgrading to v0.17. To use the deprecated functionality, start bitcoind with -deprecatedrpc=createmultisig\n"
|
||||
"\nArguments:\n"
|
||||
"1. nrequired (numeric, required) The number of required signatures out of the n keys or addresses.\n"
|
||||
"2. \"keys\" (string, required) A json array of hex-encoded public keys\n"
|
||||
|
@ -297,15 +294,8 @@ UniValue createmultisig(const JSONRPCRequest& request)
|
|||
if (IsHex(keys[i].get_str()) && (keys[i].get_str().length() == 66 || keys[i].get_str().length() == 130)) {
|
||||
pubkeys.push_back(HexToPubKey(keys[i].get_str()));
|
||||
} else {
|
||||
#ifdef ENABLE_WALLET
|
||||
CWallet* const pwallet = GetWalletForJSONRPCRequest(request);
|
||||
if (IsDeprecatedRPCEnabled("createmultisig") && EnsureWalletIsAvailable(pwallet, false)) {
|
||||
pubkeys.push_back(AddrToPubKey(pwallet, keys[i].get_str()));
|
||||
} else
|
||||
#endif
|
||||
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, strprintf("Invalid public key: %s\nNote that from v0.16, createmultisig no longer accepts addresses."
|
||||
" Clients must transition to using addmultisigaddress to create multisig addresses with addresses known to the wallet before upgrading to v0.17."
|
||||
" To use the deprecated functionality, start bitcoind with -deprecatedrpc=createmultisig", keys[i].get_str()));
|
||||
" Users must use addmultisigaddress to create multisig addresses with addresses known to the wallet.", keys[i].get_str()));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue