aboutsummaryrefslogtreecommitdiff
path: root/test/functional/feature_minchainwork.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/functional/feature_minchainwork.py')
-rwxr-xr-xtest/functional/feature_minchainwork.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/test/functional/feature_minchainwork.py b/test/functional/feature_minchainwork.py
index a1cced0bc7..dbff6f15f2 100755
--- a/test/functional/feature_minchainwork.py
+++ b/test/functional/feature_minchainwork.py
@@ -51,7 +51,8 @@ class MinimumChainWorkTest(BitcoinTestFramework):
num_blocks_to_generate = int((self.node_min_work[1] - starting_chain_work) / REGTEST_WORK_PER_BLOCK)
self.log.info("Generating %d blocks on node0", num_blocks_to_generate)
- hashes = self.nodes[0].generate(num_blocks_to_generate)
+ hashes = self.nodes[0].generatetoaddress(num_blocks_to_generate,
+ self.nodes[0].get_deterministic_priv_key().address)
self.log.info("Node0 current chain work: %s", self.nodes[0].getblockheader(hashes[-1])['chainwork'])
@@ -72,7 +73,7 @@ class MinimumChainWorkTest(BitcoinTestFramework):
assert_equal(self.nodes[2].getblockcount(), starting_blockcount)
self.log.info("Generating one more block")
- self.nodes[0].generate(1)
+ self.nodes[0].generatetoaddress(1, self.nodes[0].get_deterministic_priv_key().address)
self.log.info("Verifying nodes are all synced")