Skip to content

Commit 0cc45ed

Browse files
committed
Merge #12409: rpc: Reject deprecated reserveChangeKey in fundrawtransaction
fa5f518 rpc: Reject deprecated reserveChangeKey in fundrawtransaction (MarcoFalke) Pull request description: Tree-SHA512: 8506d1494b13c4582b1379e3b8c3906016f1980ebe847727a43a90e7bb9f71b896a1792bc97a8dc7320ccce0534050eb04f92a6f82f811d08efa74a98b3e43f0
2 parents fdc2188 + fa5f518 commit 0cc45ed

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

doc/release-notes.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,13 @@ frequently tested on them.
5656
Notable changes
5757
===============
5858

59+
RPC changes
60+
------------
61+
62+
### Low-level changes
63+
64+
- The `fundrawtransaction` rpc will reject the previously deprecated `reserveChangeKey` option.
65+
5966
Credits
6067
=======
6168

src/wallet/rpcwallet.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3129,7 +3129,6 @@ UniValue fundrawtransaction(const JSONRPCRequest& request)
31293129
{"change_type", UniValueType(UniValue::VSTR)},
31303130
{"includeWatching", UniValueType(UniValue::VBOOL)},
31313131
{"lockUnspents", UniValueType(UniValue::VBOOL)},
3132-
{"reserveChangeKey", UniValueType(UniValue::VBOOL)}, // DEPRECATED (and ignored), should be removed in 0.16 or so.
31333132
{"feeRate", UniValueType()}, // will be checked below
31343133
{"subtractFeeFromOutputs", UniValueType(UniValue::VARR)},
31353134
{"replaceable", UniValueType(UniValue::VBOOL)},

test/functional/rpc_fundrawtransaction.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,9 @@ def run_test(self):
181181

182182
assert_raises_rpc_error(-3, "Unexpected key foo", self.nodes[2].fundrawtransaction, rawtx, {'foo':'bar'})
183183

184+
# reserveChangeKey was deprecated and is now removed
185+
assert_raises_rpc_error(-3, "Unexpected key reserveChangeKey", lambda: self.nodes[2].fundrawtransaction(hexstring=rawtx, options={'reserveChangeKey': True}))
186+
184187
############################################################
185188
# test a fundrawtransaction with an invalid change address #
186189
############################################################

0 commit comments

Comments
 (0)