mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-07-04 12:42:05 +02:00
test: Implicitly sync after generate*, unless opted out
This commit is contained in:
@ -51,8 +51,7 @@ class MinimumChainWorkTest(BitcoinTestFramework):
|
||||
|
||||
num_blocks_to_generate = int((self.node_min_work[1] - starting_chain_work) / REGTEST_WORK_PER_BLOCK)
|
||||
self.log.info(f"Generating {num_blocks_to_generate} blocks on node0")
|
||||
hashes = self.generatetoaddress(self.nodes[0], num_blocks_to_generate,
|
||||
self.nodes[0].get_deterministic_priv_key().address)
|
||||
hashes = self.generate(self.nodes[0], num_blocks_to_generate, sync_fun=self.no_op)
|
||||
|
||||
self.log.info(f"Node0 current chain work: {self.nodes[0].getblockheader(hashes[-1])['chainwork']}")
|
||||
|
||||
@ -73,7 +72,7 @@ class MinimumChainWorkTest(BitcoinTestFramework):
|
||||
assert_equal(self.nodes[2].getblockcount(), starting_blockcount)
|
||||
|
||||
self.log.info("Generating one more block")
|
||||
self.generatetoaddress(self.nodes[0], 1, self.nodes[0].get_deterministic_priv_key().address)
|
||||
self.generate(self.nodes[0], 1)
|
||||
|
||||
self.log.info("Verifying nodes are all synced")
|
||||
|
||||
|
Reference in New Issue
Block a user