Skip to content

Commit c8e6d08

Browse files
committed
test: refactor: eliminate COINBASE_MATURITY magic number in fill_mempool
1 parent 4f34714 commit c8e6d08

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

test/functional/test_framework/mempool_util.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
"""Helpful routines for mempool testing."""
66
from decimal import Decimal
77

8+
from .blocktools import (
9+
COINBASE_MATURITY,
10+
)
811
from .util import (
912
assert_equal,
1013
assert_greater_than,
@@ -38,8 +41,8 @@ def fill_mempool(test_framework, node, miniwallet):
3841
# 75 transactions each with a fee rate higher than the previous one
3942
test_framework.generate(miniwallet, 1 + (num_of_batches * tx_batch_size))
4043

41-
# Mine COINBASE_MATURITY - 1 blocks so that the UTXOs are allowed to be spent
42-
test_framework.generate(node, 100 - 1)
44+
# Mine enough blocks so that the UTXOs are allowed to be spent
45+
test_framework.generate(node, COINBASE_MATURITY - 1)
4346

4447
# Get all UTXOs up front to ensure none of the transactions spend from each other, as that may
4548
# change their effective feerate and thus the order in which they are selected for eviction.

0 commit comments

Comments
 (0)