Skip to content

Commit 410e471

Browse files
committed
wallet: remove redundant bumpfee fee_rate checks
SetFeeEstimateMode() handles these checks now and provides a more actionable error message.
1 parent a0d4957 commit 410e471

File tree

2 files changed

+1
-13
lines changed

2 files changed

+1
-13
lines changed

src/wallet/rpcwallet.cpp

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3474,18 +3474,6 @@ static RPCHelpMan bumpfee_helper(std::string method_name)
34743474

34753475
auto conf_target = options.exists("confTarget") ? options["confTarget"] : options["conf_target"];
34763476

3477-
if (!conf_target.isNull()) {
3478-
if (options.exists("fee_rate")) {
3479-
throw JSONRPCError(RPC_INVALID_PARAMETER, "Cannot specify both conf_target and fee_rate. Please provide either a confirmation target in blocks for automatic fee estimation, or an explicit fee rate.");
3480-
}
3481-
} else if (options.exists("fee_rate")) {
3482-
CFeeRate fee_rate(AmountFromValue(options["fee_rate"]));
3483-
if (fee_rate <= CFeeRate(0)) {
3484-
throw JSONRPCError(RPC_INVALID_PARAMETER, strprintf("Invalid fee_rate %s (must be greater than 0)", fee_rate.ToString()));
3485-
}
3486-
coin_control.m_feerate = fee_rate;
3487-
}
3488-
34893477
if (options.exists("replaceable")) {
34903478
coin_control.m_signal_bip125_rbf = options["replaceable"].get_bool();
34913479
}

test/functional/wallet_bumpfee.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ def test_invalid_parameters(self, rbf_node, peer_node, dest_address):
111111
rbf_node.bumpfee, rbfid, {"fee_rate": INSUFFICIENT})
112112

113113
self.log.info("Test invalid fee rate settings")
114-
assert_raises_rpc_error(-8, "Invalid fee_rate 0.00000000 BTC/kB (must be greater than 0)",
114+
assert_raises_rpc_error(-8, "Insufficient total fee 0.00, must be at least 0.00001704 (oldFee 0.00000999 + incrementalFee 0.00000705)",
115115
rbf_node.bumpfee, rbfid, {"fee_rate": 0})
116116
assert_raises_rpc_error(-4, "Specified or calculated fee 0.141 is too high (cannot be higher than -maxtxfee 0.10",
117117
rbf_node.bumpfee, rbfid, {"fee_rate": TOO_HIGH})

0 commit comments

Comments
 (0)