aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Falbesoner <sebastian.falbesoner@gmail.com>2024-04-16 02:05:09 +0200
committerSebastian Falbesoner <sebastian.falbesoner@gmail.com>2024-05-05 12:33:34 +0200
commitc8e6d08236ff225db445009bf513d6d25def8eb2 (patch)
tree5e40afb42ce76f08ffdb45d7e5357f81f233ec18
parent4f347140b1a31237597dd1821adcde8bd5761edc (diff)
downloadbitcoin-c8e6d08236ff225db445009bf513d6d25def8eb2.tar.xz
test: refactor: eliminate COINBASE_MATURITY magic number in fill_mempool
-rw-r--r--test/functional/test_framework/mempool_util.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/test/functional/test_framework/mempool_util.py b/test/functional/test_framework/mempool_util.py
index 4d4b00b8b6..230a95855b 100644
--- a/test/functional/test_framework/mempool_util.py
+++ b/test/functional/test_framework/mempool_util.py
@@ -5,6 +5,9 @@
"""Helpful routines for mempool testing."""
from decimal import Decimal
+from .blocktools import (
+ COINBASE_MATURITY,
+)
from .util import (
assert_equal,
assert_greater_than,
@@ -38,8 +41,8 @@ def fill_mempool(test_framework, node, miniwallet):
# 75 transactions each with a fee rate higher than the previous one
test_framework.generate(miniwallet, 1 + (num_of_batches * tx_batch_size))
- # Mine COINBASE_MATURITY - 1 blocks so that the UTXOs are allowed to be spent
- test_framework.generate(node, 100 - 1)
+ # Mine enough blocks so that the UTXOs are allowed to be spent
+ test_framework.generate(node, COINBASE_MATURITY - 1)
# Get all UTXOs up front to ensure none of the transactions spend from each other, as that may
# change their effective feerate and thus the order in which they are selected for eviction.