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 7
7
size.
8
8
"""
9
9
10
+ from test_framework .messages import (
11
+ DEFAULT_ANCESTOR_LIMIT ,
12
+ )
10
13
from test_framework .test_framework import BitcoinTestFramework
11
14
from test_framework .util import (
12
15
assert_equal ,
15
18
from test_framework .wallet import MiniWallet
16
19
17
20
18
- DEFAULT_ANCESTOR_LIMIT = 25
19
- DEFAULT_DESCENDANT_LIMIT = 25
20
-
21
-
22
21
class MempoolPackagesTest (BitcoinTestFramework ):
23
22
def set_test_params (self ):
24
23
self .num_nodes = 1
Original file line number Diff line number Diff line change 7
7
from decimal import Decimal
8
8
9
9
from 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
+ )
11
15
from test_framework .p2p import P2PTxInvStore
12
16
from test_framework .test_framework import BitcoinTestFramework
13
17
from test_framework .util import (
16
20
chain_transaction ,
17
21
)
18
22
19
- # default limits
20
- DEFAULT_ANCESTOR_LIMIT = 25
21
- DEFAULT_DESCENDANT_LIMIT = 25
23
+
22
24
# custom limits for node1
23
25
CUSTOM_ANCESTOR_LIMIT = 5
24
26
CUSTOM_DESCENDANT_LIMIT = 10
25
27
assert CUSTOM_DESCENDANT_LIMIT >= CUSTOM_ANCESTOR_LIMIT
26
28
29
+
27
30
class MempoolPackagesTest (BitcoinTestFramework ):
28
31
def set_test_params (self ):
29
32
self .num_nodes = 2
Original file line number Diff line number Diff line change 65
65
66
66
WITNESS_SCALE_FACTOR = 4
67
67
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
+
68
71
69
72
def sha256 (s ):
70
73
return hashlib .sha256 (s ).digest ()
You can’t perform that action at this time.
0 commit comments