Skip to content

Commit 436e88f

Browse files
committed
bumpfee: ignore WALLET_INCREMENTAL_RELAY_FEE when user specifies fee rate
This commit update CheckFeeRate's incrementalRelayFee to use relayIncrementalFee not max of (walletIncrementalRelayfee and relayIncrementalFee). The restriction is not needed since user provided the fee rate.
1 parent 717103b commit 436e88f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/wallet/feebumper.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ static feebumper::Result CheckFeeRate(const CWallet& wallet, const CMutableTrans
9292
}
9393
CAmount new_total_fee = newFeerate.GetFee(maxTxSize) + combined_bump_fee.value();
9494

95-
CFeeRate incrementalRelayFee = std::max(wallet.chain().relayIncrementalFee(), CFeeRate(WALLET_INCREMENTAL_RELAY_FEE));
95+
CFeeRate incrementalRelayFee = wallet.chain().relayIncrementalFee();
9696

9797
// Min total fee is old fee + relay fee
9898
CAmount minTotalFee = old_fee + incrementalRelayFee.GetFee(maxTxSize);

test/functional/wallet_bumpfee.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -815,7 +815,7 @@ def test_feerate_checks_replaced_outputs(self, rbf_node, peer_node):
815815
# Since the bumped tx will replace all of the outputs with a single output, we can estimate that its size will 31 * (len(outputs) - 1) bytes smaller
816816
tx_size = tx_details["decoded"]["vsize"]
817817
est_bumped_size = tx_size - (len(tx_details["decoded"]["vout"]) - 1) * 31
818-
inc_fee_rate = max(rbf_node.getmempoolinfo()["incrementalrelayfee"], Decimal(0.00005000)) # Wallet has a fixed incremental relay fee of 5 sat/vb
818+
inc_fee_rate = rbf_node.getmempoolinfo()["incrementalrelayfee"]
819819
# RPC gives us fee as negative
820820
min_fee = (-tx_details["fee"] + get_fee(est_bumped_size, inc_fee_rate)) * Decimal(1e8)
821821
min_fee_rate = (min_fee / est_bumped_size).quantize(Decimal("1.000"))

0 commit comments

Comments
 (0)