diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2017-07-25 22:02:42 +0200 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2017-07-25 22:02:58 +0200 |
commit | 8537187d421366e434b1b4b5bc6b379a4d5208ed (patch) | |
tree | 020e094a52db9b6c09af01c511e1ae9a089c9cca /src | |
parent | 9d5e8f92a7dbac65e327a770998607b1b0f67db1 (diff) | |
parent | 99c7fc39a5359fda8503e053f9da676c6684efd7 (diff) |
Merge #10799: Prevent user from specifying conflicting parameters to fundrawtx
99c7fc3 Prevent user from specifying conflicting parameters to fundrawtx (Matt Corallo)
Pull request description:
estimate_mode/conf_target both are overridden by feeRate, so should
not be specified together with feeRate.
Based on #10706
Tree-SHA512: 8ccd08575fd1f2a0d45112538ffbbc73983ee172963230b0cc7ac41d13c6f3c740917f82b212c41ded3a64d873452e7f2c7af49f3b47cab897f8e85117f21333
Diffstat (limited to 'src')
-rw-r--r-- | src/wallet/rpcwallet.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp index fb4d30d493..2b745c5040 100644 --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -2875,9 +2875,15 @@ UniValue fundrawtransaction(const JSONRPCRequest& request) coinControl.signalRbf = options["replaceable"].get_bool(); } if (options.exists("conf_target")) { + if (options.exists("feeRate")) { + throw JSONRPCError(RPC_INVALID_PARAMETER, "Cannot specify both conf_target and feeRate"); + } coinControl.m_confirm_target = ParseConfirmTarget(options["conf_target"]); } if (options.exists("estimate_mode")) { + if (options.exists("feeRate")) { + throw JSONRPCError(RPC_INVALID_PARAMETER, "Cannot specify both estimate_mode and feeRate"); + } if (!FeeModeFromString(options["estimate_mode"].get_str(), coinControl.m_fee_mode)) { throw JSONRPCError(RPC_INVALID_PARAMETER, "Invalid estimate_mode parameter"); } |