diff options
| author | MarcoFalke <[email protected]> | 2018-02-10 22:12:43 -0500 |
|---|---|---|
| committer | MarcoFalke <[email protected]> | 2018-02-10 22:11:31 -0500 |
| commit | fa5f51830d2649cace2fc827084093019497c151 (patch) | |
| tree | 8a1aabc02312abfdd013b8c9fc983c3011ef05d7 | |
| parent | Merge #12225: Mempool cleanups (diff) | |
| download | discoin-fa5f51830d2649cace2fc827084093019497c151.tar.xz discoin-fa5f51830d2649cace2fc827084093019497c151.zip | |
rpc: Reject deprecated reserveChangeKey in fundrawtransaction
| -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 0292eaa4d..528cb81a3 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 261d9b37f..e9a63c186 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 6b9c9c15b..4d3be1851 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 # ############################################################ |