aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/rpcwallet.cpp
diff options
context:
space:
mode:
authorMatt Corallo <git@bluematt.me>2017-07-11 20:59:46 -0400
committerMatt Corallo <git@bluematt.me>2017-07-17 13:47:45 -0400
commit99c7fc39a5359fda8503e053f9da676c6684efd7 (patch)
tree8ab0d84ce0a4a253e4ed69b6f2c564c803a678df /src/wallet/rpcwallet.cpp
parent0b019357ff09e7a522307fc271d6b60562a7b890 (diff)
downloadbitcoin-99c7fc39a5359fda8503e053f9da676c6684efd7.tar.xz
Prevent user from specifying conflicting parameters to fundrawtx
estimate_mode/conf_target both are overridden by feeRate, so should not be specified together with feeRate.
Diffstat (limited to 'src/wallet/rpcwallet.cpp')
-rw-r--r--src/wallet/rpcwallet.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp
index ee8c7548fc..079b2ce789 100644
--- a/src/wallet/rpcwallet.cpp
+++ b/src/wallet/rpcwallet.cpp
@@ -2795,9 +2795,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");
}