Skip to content

Commit 15f696b

Browse files
committed
Merge bitcoin/bitcoin#29986: test: Don't rely on incentive incompatible replacement in mempool_accept_v3.py
f8a141c test: Don't rely on incentive incompatible replacement in mempool_accept_v3.py (Suhas Daftuar) Pull request description: In the sibling eviction test, we're currently testing that a transaction with ancestor feerate (and mining score) of 179 s/b is able to replace a transaction with ancestor feerate (and mining score) of 300 s/b, due to a shortcoming in our current RBF rules. In preparation for fixing our RBF rules to not allow such replacements, fix the test by bumping the fee of the replacement to be a bit higher. ACKs for top commit: glozow: ACK f8a141c instagibbs: ACK f8a141c Tree-SHA512: 0babe60be2f41634301e434fedb7abc765daaa37c2c280acb569eaf02a793369d81401ab02b8ae1689bda4872f475bd4c2f48cae4a54a61ece20db0a014e23ac
2 parents 36e660f + f8a141c commit 15f696b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/functional/mempool_accept_v3.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -533,10 +533,10 @@ def test_v3_sibling_eviction(self):
533533
tx_unrelated_replacee = self.wallet.send_self_transfer(from_node=node, utxo_to_spend=utxo_unrelated_conflict)
534534
assert tx_unrelated_replacee["txid"] in node.getrawmempool()
535535

536-
fee_to_beat_child2 = int(tx_v3_child_2["fee"] * COIN)
536+
fee_to_beat = max(int(tx_v3_child_2["fee"] * COIN), int(tx_unrelated_replacee["fee"]*COIN))
537537

538538
tx_v3_child_3 = self.wallet.create_self_transfer_multi(
539-
utxos_to_spend=[tx_v3_parent["new_utxos"][0], utxo_unrelated_conflict], fee_per_output=fee_to_beat_child2*5, version=3
539+
utxos_to_spend=[tx_v3_parent["new_utxos"][0], utxo_unrelated_conflict], fee_per_output=fee_to_beat*2, version=3
540540
)
541541
node.sendrawtransaction(tx_v3_child_3["hex"])
542542
self.check_mempool(txids_v2_100 + [tx_v3_parent["txid"], tx_v3_child_3["txid"]])

0 commit comments

Comments
 (0)