mirror of
https://github.com/dashpay/dash.git
synced 2024-12-27 21:12:48 +01:00
rpc: Reject deprecated reserveChangeKey in fundrawtransaction
This commit is contained in:
parent
67447ba060
commit
fa5f51830d
@ -56,6 +56,13 @@ frequently tested on them.
|
|||||||
Notable changes
|
Notable changes
|
||||||
===============
|
===============
|
||||||
|
|
||||||
|
RPC changes
|
||||||
|
------------
|
||||||
|
|
||||||
|
### Low-level changes
|
||||||
|
|
||||||
|
- The `fundrawtransaction` rpc will reject the previously deprecated `reserveChangeKey` option.
|
||||||
|
|
||||||
Credits
|
Credits
|
||||||
=======
|
=======
|
||||||
|
|
||||||
|
@ -3129,7 +3129,6 @@ UniValue fundrawtransaction(const JSONRPCRequest& request)
|
|||||||
{"change_type", UniValueType(UniValue::VSTR)},
|
{"change_type", UniValueType(UniValue::VSTR)},
|
||||||
{"includeWatching", UniValueType(UniValue::VBOOL)},
|
{"includeWatching", UniValueType(UniValue::VBOOL)},
|
||||||
{"lockUnspents", 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
|
{"feeRate", UniValueType()}, // will be checked below
|
||||||
{"subtractFeeFromOutputs", UniValueType(UniValue::VARR)},
|
{"subtractFeeFromOutputs", UniValueType(UniValue::VARR)},
|
||||||
{"replaceable", UniValueType(UniValue::VBOOL)},
|
{"replaceable", UniValueType(UniValue::VBOOL)},
|
||||||
|
@ -181,6 +181,9 @@ class RawTransactionsTest(BitcoinTestFramework):
|
|||||||
|
|
||||||
assert_raises_rpc_error(-3, "Unexpected key foo", self.nodes[2].fundrawtransaction, rawtx, {'foo':'bar'})
|
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 #
|
# test a fundrawtransaction with an invalid change address #
|
||||||
############################################################
|
############################################################
|
||||||
|
Loading…
Reference in New Issue
Block a user