@@ -57,18 +57,21 @@ def fill_mempool(test_framework, node):
57
57
tx_to_be_evicted_id = ephemeral_miniwallet .send_self_transfer (
58
58
from_node = node , utxo_to_spend = confirmed_utxos .pop (0 ), fee_rate = relayfee )["txid" ]
59
59
60
+ def send_batch (fee ):
61
+ utxos = confirmed_utxos [:tx_batch_size ]
62
+ create_lots_of_big_transactions (ephemeral_miniwallet , node , fee , tx_batch_size , txouts , utxos )
63
+ del confirmed_utxos [:tx_batch_size ]
64
+
60
65
# Increase the tx fee rate to give the subsequent transactions a higher priority in the mempool
61
66
# The tx has an approx. vsize of 65k, i.e. multiplying the previous fee rate (in sats/kvB)
62
67
# by 130 should result in a fee that corresponds to 2x of that fee rate
63
68
base_fee = relayfee * 130
69
+ batch_fees = [(i + 1 ) * base_fee for i in range (num_of_batches )]
64
70
65
71
test_framework .log .debug ("Fill up the mempool with txs with higher fee rate" )
66
72
with node .assert_debug_log (["rolling minimum fee bumped" ]):
67
- for batch_of_txid in range (num_of_batches ):
68
- fee = (batch_of_txid + 1 ) * base_fee
69
- utxos = confirmed_utxos [:tx_batch_size ]
70
- create_lots_of_big_transactions (ephemeral_miniwallet , node , fee , tx_batch_size , txouts , utxos )
71
- del confirmed_utxos [:tx_batch_size ]
73
+ for fee in batch_fees :
74
+ send_batch (fee )
72
75
73
76
test_framework .log .debug ("The tx should be evicted by now" )
74
77
# The number of transactions created should be greater than the ones present in the mempool
0 commit comments