mirror of
https://github.com/kvazar-network/kevacoin.git
synced 2025-01-11 23:58:18 +00:00
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
This commit is contained in:
commit
8537187d42
@ -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");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user