Skip to content

Commit

Permalink
Merge #12409: rpc: Reject deprecated reserveChangeKey in fundrawtrans…
Browse files Browse the repository at this point in the history
…action

fa5f518 rpc: Reject deprecated reserveChangeKey in fundrawtransaction (MarcoFalke)

Pull request description:

Tree-SHA512: 8506d1494b13c4582b1379e3b8c3906016f1980ebe847727a43a90e7bb9f71b896a1792bc97a8dc7320ccce0534050eb04f92a6f82f811d08efa74a98b3e43f0
  • Loading branch information
laanwj committed Feb 14, 2018
2 parents fdc2188 + fa5f518 commit 0cc45ed
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
7 changes: 7 additions & 0 deletions doc/release-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
=======

Expand Down
1 change: 0 additions & 1 deletion src/wallet/rpcwallet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)},
Expand Down
3 changes: 3 additions & 0 deletions test/functional/rpc_fundrawtransaction.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,9 @@ def run_test(self):

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 #
############################################################
Expand Down

0 comments on commit 0cc45ed

Please sign in to comment.