mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-08-09 04:12:29 +02:00
Use generate* from TestFramework
The changes in feature_rbf can be reviewed with --color-moved=dimmed-zebra --color-moved-ws=ignore-all-space
This commit is contained in:
@@ -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)],
|
||||
)
|
||||
|
Reference in New Issue
Block a user