diff options
author | Sebastian Falbesoner <sebastian.falbesoner@gmail.com> | 2022-08-09 15:04:59 +0200 |
---|---|---|
committer | Sebastian Falbesoner <sebastian.falbesoner@gmail.com> | 2022-08-09 15:22:38 +0200 |
commit | b4a5ab96b42957a0e2110525b9e2e450deda09c1 (patch) | |
tree | 0ee38e783c9bd7f6167f5eebcdbc49794398a970 /test/functional/mempool_packages.py | |
parent | 0fda1c7df6165a60f63ced139ed10169f5df55f8 (diff) |
test: refactor: deduplicate `DEFAULT_{ANCESTOR,DESCENDANT}_LIMIT` constants
Diffstat (limited to 'test/functional/mempool_packages.py')
-rwxr-xr-x | test/functional/mempool_packages.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/test/functional/mempool_packages.py b/test/functional/mempool_packages.py index 99bf148827..def0b1fce4 100755 --- a/test/functional/mempool_packages.py +++ b/test/functional/mempool_packages.py @@ -7,7 +7,11 @@ from decimal import Decimal from test_framework.blocktools import COINBASE_MATURITY -from test_framework.messages import COIN +from test_framework.messages import ( + COIN, + DEFAULT_ANCESTOR_LIMIT, + DEFAULT_DESCENDANT_LIMIT, +) from test_framework.p2p import P2PTxInvStore from test_framework.test_framework import BitcoinTestFramework from test_framework.util import ( @@ -16,14 +20,13 @@ from test_framework.util import ( chain_transaction, ) -# default limits -DEFAULT_ANCESTOR_LIMIT = 25 -DEFAULT_DESCENDANT_LIMIT = 25 + # custom limits for node1 CUSTOM_ANCESTOR_LIMIT = 5 CUSTOM_DESCENDANT_LIMIT = 10 assert CUSTOM_DESCENDANT_LIMIT >= CUSTOM_ANCESTOR_LIMIT + class MempoolPackagesTest(BitcoinTestFramework): def set_test_params(self): self.num_nodes = 2 |