File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
test/functional/test_framework Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 19
19
import time
20
20
21
21
from typing import List
22
+ from .address import ADDRESS_BCRT1_P2WSH_OP_TRUE
22
23
from .authproxy import JSONRPCException
23
24
from . import coverage
24
25
from .p2p import NetworkThread
@@ -732,16 +733,17 @@ def _initialize_chain(self):
732
733
# Set a time in the past, so that blocks don't end up in the future
733
734
cache_node .setmocktime (cache_node .getblockheader (cache_node .getbestblockhash ())['time' ])
734
735
735
- # Create a 199-block-long chain; each of the 4 first nodes
736
+ # Create a 199-block-long chain; each of the 3 first nodes
736
737
# gets 25 mature blocks and 25 immature.
737
- # The 4th node gets only 24 immature blocks so that the very last
738
+ # The 4th address gets 25 mature and only 24 immature blocks so that the very last
738
739
# block in the cache does not age too much (have an old tip age).
739
740
# This is needed so that we are out of IBD when the test starts,
740
741
# see the tip age check in IsInitialBlockDownload().
742
+ gen_addresses = [k .address for k in TestNode .PRIV_KEYS ] + [ADDRESS_BCRT1_P2WSH_OP_TRUE ]
741
743
for i in range (8 ):
742
744
cache_node .generatetoaddress (
743
745
nblocks = 25 if i != 7 else 24 ,
744
- address = TestNode . PRIV_KEYS [i % 4 ]. address ,
746
+ address = gen_addresses [i % 4 ],
745
747
)
746
748
747
749
assert_equal (cache_node .getblockchaininfo ()["blocks" ], 199 )
You can’t perform that action at this time.
0 commit comments