Skip to content

Commit 8537187

Browse files
committed
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
2 parents 9d5e8f9 + 99c7fc3 commit 8537187

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
@@ -2875,9 +2875,15 @@ UniValue fundrawtransaction(const JSONRPCRequest& request)
28752875
coinControl.signalRbf = options["replaceable"].get_bool();
28762876
}
28772877
if (options.exists("conf_target")) {
2878+
if (options.exists("feeRate")) {
2879+
throw JSONRPCError(RPC_INVALID_PARAMETER, "Cannot specify both conf_target and feeRate");
2880+
}
28782881
coinControl.m_confirm_target = ParseConfirmTarget(options["conf_target"]);
28792882
}
28802883
if (options.exists("estimate_mode")) {
2884+
if (options.exists("feeRate")) {
2885+
throw JSONRPCError(RPC_INVALID_PARAMETER, "Cannot specify both estimate_mode and feeRate");
2886+
}
28812887
if (!FeeModeFromString(options["estimate_mode"].get_str(), coinControl.m_fee_mode)) {
28822888
throw JSONRPCError(RPC_INVALID_PARAMETER, "Invalid estimate_mode parameter");
28832889
}

0 commit comments

Comments
 (0)