From 0ca4c8b3c61984e9e2ab5a2a9a7c47faf139d1fc Mon Sep 17 00:00:00 2001 From: sanket1729 Date: Sat, 15 Sep 2018 04:32:12 -0500 Subject: Changed functional tests which do not require wallets to run without skipping .Addreses #14216. Changed get_deterministic_priv_key() to a named tuple --- test/functional/feature_minchainwork.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'test/functional/feature_minchainwork.py') diff --git a/test/functional/feature_minchainwork.py b/test/functional/feature_minchainwork.py index 5d180c2244..dbff6f15f2 100755 --- a/test/functional/feature_minchainwork.py +++ b/test/functional/feature_minchainwork.py @@ -31,9 +31,6 @@ class MinimumChainWorkTest(BitcoinTestFramework): self.extra_args = [[], ["-minimumchainwork=0x65"], ["-minimumchainwork=0x65"]] self.node_min_work = [0, 101, 101] - def skip_test_if_missing_module(self): - self.skip_if_no_wallet() - def setup_network(self): # This test relies on the chain setup being: # node0 <- node1 <- node2 @@ -54,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']) @@ -75,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") -- cgit v1.2.3