diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2018-02-14 16:42:40 +0100 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2018-02-14 16:43:55 +0100 |
commit | 0cc45edc0f8a8e8d7569c896e487ff5f8f11c445 (patch) | |
tree | 324b8409d1910b3ed6c9985fbb2a8e5e983e9a22 | |
parent | fdc2188da27fdf6fa62dd477b00b8f0ede994a0e (diff) | |
parent | fa5f51830d2649cace2fc827084093019497c151 (diff) |
Merge #12409: rpc: Reject deprecated reserveChangeKey in fundrawtransaction
fa5f518 rpc: Reject deprecated reserveChangeKey in fundrawtransaction (MarcoFalke)
Pull request description:
Tree-SHA512: 8506d1494b13c4582b1379e3b8c3906016f1980ebe847727a43a90e7bb9f71b896a1792bc97a8dc7320ccce0534050eb04f92a6f82f811d08efa74a98b3e43f0
-rw-r--r-- | doc/release-notes.md | 7 | ||||
-rw-r--r-- | src/wallet/rpcwallet.cpp | 1 | ||||
-rwxr-xr-x | test/functional/rpc_fundrawtransaction.py | 3 |
3 files changed, 10 insertions, 1 deletions
diff --git a/doc/release-notes.md b/doc/release-notes.md index 0292eaa4d2..528cb81a38 100644 --- a/doc/release-notes.md +++ b/doc/release-notes.md @@ -56,6 +56,13 @@ frequently tested on them. Notable changes =============== +RPC changes +------------ + +### Low-level changes + +- The `fundrawtransaction` rpc will reject the previously deprecated `reserveChangeKey` option. + Credits ======= diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp index b466cf1a81..c03f7d7923 100644 --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -3129,7 +3129,6 @@ UniValue fundrawtransaction(const JSONRPCRequest& request) {"change_type", UniValueType(UniValue::VSTR)}, {"includeWatching", UniValueType(UniValue::VBOOL)}, {"lockUnspents", UniValueType(UniValue::VBOOL)}, - {"reserveChangeKey", UniValueType(UniValue::VBOOL)}, // DEPRECATED (and ignored), should be removed in 0.16 or so. {"feeRate", UniValueType()}, // will be checked below {"subtractFeeFromOutputs", UniValueType(UniValue::VARR)}, {"replaceable", UniValueType(UniValue::VBOOL)}, diff --git a/test/functional/rpc_fundrawtransaction.py b/test/functional/rpc_fundrawtransaction.py index 6b9c9c15b7..4d3be18516 100755 --- a/test/functional/rpc_fundrawtransaction.py +++ b/test/functional/rpc_fundrawtransaction.py @@ -181,6 +181,9 @@ class RawTransactionsTest(BitcoinTestFramework): assert_raises_rpc_error(-3, "Unexpected key foo", self.nodes[2].fundrawtransaction, rawtx, {'foo':'bar'}) + # reserveChangeKey was deprecated and is now removed + assert_raises_rpc_error(-3, "Unexpected key reserveChangeKey", lambda: self.nodes[2].fundrawtransaction(hexstring=rawtx, options={'reserveChangeKey': True})) + ############################################################ # test a fundrawtransaction with an invalid change address # ############################################################ |