aboutsummaryrefslogtreecommitdiff
path: root/test/functional/feature_minchainwork.py
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2020-11-10 18:02:31 +0100
committerMarcoFalke <falke.marco@gmail.com>2021-10-29 13:34:52 +0200
commitfacc352648e4fe1ed9b406400b6e4a9d51f30349 (patch)
tree7bba05900db761f91c0b416985a3a774984bfd49 /test/functional/feature_minchainwork.py
parent5574881ce329f91cc5bbc2b9585860a45fde7c3c (diff)
downloadbitcoin-facc352648e4fe1ed9b406400b6e4a9d51f30349.tar.xz
test: Implicitly sync after generate*, unless opted out
Diffstat (limited to 'test/functional/feature_minchainwork.py')
-rwxr-xr-xtest/functional/feature_minchainwork.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/test/functional/feature_minchainwork.py b/test/functional/feature_minchainwork.py
index 11cb4aa3cb..a77f022ddd 100755
--- a/test/functional/feature_minchainwork.py
+++ b/test/functional/feature_minchainwork.py
@@ -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")