mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-03 17:30:25 +01:00
test: Fix test cache issue
The documentation did not match the implementation, no coins were mined to the OP_TRUE address.
This commit is contained in:
@@ -739,11 +739,12 @@ class BitcoinTestFramework(metaclass=BitcoinTestMetaClass):
|
||||
# block in the cache does not age too much (have an old tip age).
|
||||
# This is needed so that we are out of IBD when the test starts,
|
||||
# see the tip age check in IsInitialBlockDownload().
|
||||
gen_addresses = [k.address for k in TestNode.PRIV_KEYS] + [ADDRESS_BCRT1_P2WSH_OP_TRUE]
|
||||
gen_addresses = [k.address for k in TestNode.PRIV_KEYS][:3] + [ADDRESS_BCRT1_P2WSH_OP_TRUE]
|
||||
assert_equal(len(gen_addresses), 4)
|
||||
for i in range(8):
|
||||
cache_node.generatetoaddress(
|
||||
nblocks=25 if i != 7 else 24,
|
||||
address=gen_addresses[i % 4],
|
||||
address=gen_addresses[i % len(gen_addresses)],
|
||||
)
|
||||
|
||||
assert_equal(cache_node.getblockchaininfo()["blocks"], 199)
|
||||
|
||||
Reference in New Issue
Block a user