File tree Expand file tree Collapse file tree 3 files changed +13
-8
lines changed
Expand file tree Collapse file tree 3 files changed +13
-8
lines changed Original file line number Diff line number Diff line change 77 size.
88"""
99
10+ from test_framework .messages import (
11+ DEFAULT_ANCESTOR_LIMIT ,
12+ )
1013from test_framework .test_framework import BitcoinTestFramework
1114from test_framework .util import (
1215 assert_equal ,
1518from test_framework .wallet import MiniWallet
1619
1720
18- DEFAULT_ANCESTOR_LIMIT = 25
19- DEFAULT_DESCENDANT_LIMIT = 25
20-
21-
2221class MempoolPackagesTest (BitcoinTestFramework ):
2322 def set_test_params (self ):
2423 self .num_nodes = 1
Original file line number Diff line number Diff line change 77from decimal import Decimal
88
99from test_framework .blocktools import COINBASE_MATURITY
10- from test_framework .messages import COIN
10+ from test_framework .messages import (
11+ COIN ,
12+ DEFAULT_ANCESTOR_LIMIT ,
13+ DEFAULT_DESCENDANT_LIMIT ,
14+ )
1115from test_framework .p2p import P2PTxInvStore
1216from test_framework .test_framework import BitcoinTestFramework
1317from test_framework .util import (
1620 chain_transaction ,
1721)
1822
19- # default limits
20- DEFAULT_ANCESTOR_LIMIT = 25
21- DEFAULT_DESCENDANT_LIMIT = 25
23+
2224# custom limits for node1
2325CUSTOM_ANCESTOR_LIMIT = 5
2426CUSTOM_DESCENDANT_LIMIT = 10
2527assert CUSTOM_DESCENDANT_LIMIT >= CUSTOM_ANCESTOR_LIMIT
2628
29+
2730class MempoolPackagesTest (BitcoinTestFramework ):
2831 def set_test_params (self ):
2932 self .num_nodes = 2
Original file line number Diff line number Diff line change 6565
6666WITNESS_SCALE_FACTOR = 4
6767
68+ DEFAULT_ANCESTOR_LIMIT = 25 # default max number of in-mempool ancestors
69+ DEFAULT_DESCENDANT_LIMIT = 25 # default max number of in-mempool descendants
70+
6871
6972def sha256 (s ):
7073 return hashlib .sha256 (s ).digest ()
You can’t perform that action at this time.
0 commit comments