Skip to content

Commit

Permalink
Merge bitcoin#15642: [rpc] Remove deprecated rpc warnings
Browse files Browse the repository at this point in the history
947f73c [docs] remove reference to signrawtransaction in the developer docs. (John Newbery)
7b6616b [rpc] Remove deprecated functionality message from validateaddress help (John Newbery)
839c3f7 [rpc] Remove signrawtransaction warning (John Newbery)

Pull request description:

  Removes some deprecated code from the RPCs:

  - signrawtransaction was deprecated in 0.17 and removed in 0.18. A warning message was left in place to advise users to use signrawtransactionwithwallet and signrawtransactionwithkey. That warning can now be removed.
  - validateaddress had some functionality deprecated in 0.17 and removed in 0.18. The help text for that functionality was not removed in 0.18 and can be removed now.

Tree-SHA512: 981678a697954ff2c392752e5a183b4b12c4eb94f55766ee1aa97a70d300668237db8fc5748c2772869d0155ba4a93e38817887b98160ee972a6f6ee94e3f7d9
  • Loading branch information
laanwj committed Mar 23, 2019
2 parents 6852059 + 947f73c commit 7b13c64
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 18 deletions.
3 changes: 1 addition & 2 deletions doc/developer-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -952,8 +952,7 @@ A few guidelines for introducing and reviewing new RPC interfaces:
from there.
- A RPC method must either be a wallet method or a non-wallet method. Do not
introduce new methods such as `signrawtransaction` that differ in behavior
based on presence of a wallet.
introduce new methods that differ in behavior based on presence of a wallet.
- *Rationale*: as well as complicating the implementation and interfering
with the introduction of multi-wallet, wallet and non-wallet code should be
Expand Down
1 change: 0 additions & 1 deletion src/qt/rpcconsole.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ const QStringList historyFilter = QStringList()
<< "importmulti"
<< "sethdseed"
<< "signmessagewithprivkey"
<< "signrawtransaction"
<< "signrawtransactionwithkey"
<< "walletpassphrase"
<< "walletpassphrasechange"
Expand Down
6 changes: 1 addition & 5 deletions src/rpc/misc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,7 @@ static UniValue validateaddress(const JSONRPCRequest& request)
if (request.fHelp || request.params.size() != 1)
throw std::runtime_error(
RPCHelpMan{"validateaddress",
"\nReturn information about the given bitcoin address.\n"
"DEPRECATION WARNING: Parts of this command have been deprecated and moved to getaddressinfo. Clients must\n"
"transition to using getaddressinfo to access this information before upgrading to v0.18. The following deprecated\n"
"fields have moved to getaddressinfo and will only be shown here with -deprecatedrpc=validateaddress: ismine, iswatchonly,\n"
"script, hex, pubkeys, sigsrequired, pubkey, addresses, embedded, iscompressed, account, timestamp, hdkeypath, kdmasterkeyid.\n",
"\nReturn information about the given bitcoin address.\n",
{
{"address", RPCArg::Type::STR, RPCArg::Optional::NO, "The bitcoin address to validate"},
},
Expand Down
9 changes: 0 additions & 9 deletions src/rpc/rawtransaction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1021,14 +1021,6 @@ static UniValue signrawtransactionwithkey(const JSONRPCRequest& request)
return SignTransaction(*g_rpc_interfaces->chain, mtx, request.params[2], &keystore, true, request.params[3]);
}

UniValue signrawtransaction(const JSONRPCRequest& request)
{
// This method should be removed entirely in V0.19, along with the entries in the
// CRPCCommand table and rpc/client.cpp.
throw JSONRPCError(RPC_METHOD_DEPRECATED, "signrawtransaction was removed in v0.18.\n"
"Clients should transition to using signrawtransactionwithkey and signrawtransactionwithwallet");
}

static UniValue sendrawtransaction(const JSONRPCRequest& request)
{
if (request.fHelp || request.params.size() < 1 || request.params.size() > 2)
Expand Down Expand Up @@ -2078,7 +2070,6 @@ static const CRPCCommand commands[] =
{ "rawtransactions", "decodescript", &decodescript, {"hexstring"} },
{ "rawtransactions", "sendrawtransaction", &sendrawtransaction, {"hexstring","allowhighfees|maxfeerate"} },
{ "rawtransactions", "combinerawtransaction", &combinerawtransaction, {"txs"} },
{ "hidden", "signrawtransaction", &signrawtransaction, {"hexstring","prevtxs","privkeys","sighashtype"} },
{ "rawtransactions", "signrawtransactionwithkey", &signrawtransactionwithkey, {"hexstring","privkeys","prevtxs","sighashtype"} },
{ "rawtransactions", "testmempoolaccept", &testmempoolaccept, {"rawtxs","allowhighfees|maxfeerate"} },
{ "rawtransactions", "decodepsbt", &decodepsbt, {"psbt"} },
Expand Down
1 change: 0 additions & 1 deletion test/functional/rpc_signrawtransaction.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ class SignRawTransactionsTest(BitcoinTestFramework):
def set_test_params(self):
self.setup_clean_chain = True
self.num_nodes = 2
self.extra_args = [["-deprecatedrpc=signrawtransaction"], []]

def skip_test_if_missing_module(self):
self.skip_if_no_wallet()
Expand Down

0 comments on commit 7b13c64

Please sign in to comment.