Skip to content

Commit 99c7fc3

Browse files
committed
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.
1 parent 0b01935 commit 99c7fc3

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/wallet/rpcwallet.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2795,9 +2795,15 @@ UniValue fundrawtransaction(const JSONRPCRequest& request)
27952795
coinControl.signalRbf = options["replaceable"].get_bool();
27962796
}
27972797
if (options.exists("conf_target")) {
2798+
if (options.exists("feeRate")) {
2799+
throw JSONRPCError(RPC_INVALID_PARAMETER, "Cannot specify both conf_target and feeRate");
2800+
}
27982801
coinControl.m_confirm_target = ParseConfirmTarget(options["conf_target"]);
27992802
}
28002803
if (options.exists("estimate_mode")) {
2804+
if (options.exists("feeRate")) {
2805+
throw JSONRPCError(RPC_INVALID_PARAMETER, "Cannot specify both estimate_mode and feeRate");
2806+
}
28012807
if (!FeeModeFromString(options["estimate_mode"].get_str(), coinControl.m_fee_mode)) {
28022808
throw JSONRPCError(RPC_INVALID_PARAMETER, "Invalid estimate_mode parameter");
28032809
}

0 commit comments

Comments
 (0)