From fab2e23b579c44f1b4bed4d813bbe5a21eaa22c8 Mon Sep 17 00:00:00 2001 From: MarcoFalke Date: Tue, 27 Jul 2021 20:04:51 +0200 Subject: Use generate* from TestFramework The changes in feature_rbf can be reviewed with --color-moved=dimmed-zebra --color-moved-ws=ignore-all-space --- test/functional/test_framework/test_framework.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'test/functional/test_framework/test_framework.py') diff --git a/test/functional/test_framework/test_framework.py b/test/functional/test_framework/test_framework.py index fe17b83632..f382e0fdb3 100755 --- a/test/functional/test_framework/test_framework.py +++ b/test/functional/test_framework/test_framework.py @@ -410,7 +410,7 @@ class BitcoinTestFramework(metaclass=BitcoinTestMetaClass): # To ensure that all nodes are out of IBD, the most recent block # must have a timestamp not too old (see IsInitialBlockDownload()). self.log.debug('Generate a block with current time') - block_hash = self.nodes[0].generate(1)[0] + block_hash = self.generate(self.nodes[0], 1)[0] block = self.nodes[0].getblock(blockhash=block_hash, verbosity=0) for n in self.nodes: n.submitblock(block) @@ -765,7 +765,8 @@ class BitcoinTestFramework(metaclass=BitcoinTestMetaClass): 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( + self.generatetoaddress( + cache_node, nblocks=25 if i != 7 else 24, address=gen_addresses[i % len(gen_addresses)], ) -- cgit v1.2.3