mirror of
https://github.com/bitcoin/bitcoin.git
synced 2024-11-20 10:38:42 +01:00
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.
This commit is contained in:
parent
717103bcce
commit
436e88f433
@ -92,7 +92,7 @@ static feebumper::Result CheckFeeRate(const CWallet& wallet, const CMutableTrans
|
||||
}
|
||||
CAmount new_total_fee = newFeerate.GetFee(maxTxSize) + combined_bump_fee.value();
|
||||
|
||||
CFeeRate incrementalRelayFee = std::max(wallet.chain().relayIncrementalFee(), CFeeRate(WALLET_INCREMENTAL_RELAY_FEE));
|
||||
CFeeRate incrementalRelayFee = wallet.chain().relayIncrementalFee();
|
||||
|
||||
// Min total fee is old fee + relay fee
|
||||
CAmount minTotalFee = old_fee + incrementalRelayFee.GetFee(maxTxSize);
|
||||
|
@ -815,7 +815,7 @@ def test_feerate_checks_replaced_outputs(self, rbf_node, peer_node):
|
||||
# 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
|
||||
tx_size = tx_details["decoded"]["vsize"]
|
||||
est_bumped_size = tx_size - (len(tx_details["decoded"]["vout"]) - 1) * 31
|
||||
inc_fee_rate = max(rbf_node.getmempoolinfo()["incrementalrelayfee"], Decimal(0.00005000)) # Wallet has a fixed incremental relay fee of 5 sat/vb
|
||||
inc_fee_rate = rbf_node.getmempoolinfo()["incrementalrelayfee"]
|
||||
# RPC gives us fee as negative
|
||||
min_fee = (-tx_details["fee"] + get_fee(est_bumped_size, inc_fee_rate)) * Decimal(1e8)
|
||||
min_fee_rate = (min_fee / est_bumped_size).quantize(Decimal("1.000"))
|
||||
|
Loading…
Reference in New Issue
Block a user