scripted-diff: Use generate* from TestFramework

-BEGIN VERIFY SCRIPT-
 sed --regexp-extended -i \
     's/((self\.)?(nodes\[[^]]+\]|[a-z_]*(wallet|node)[0-9a-z_]*))\.(generate(|toaddress|block|todescriptor)(\(|, ))/self.\5\1, /g' \
     $(git grep -l generate ./test | grep -v 'test_framework/' | grep -v 'feature_rbf')
-END VERIFY SCRIPT-
This commit is contained in:
MarcoFalke
2021-08-19 17:10:24 +02:00
parent 245462b66c
commit fa0b916971
117 changed files with 468 additions and 468 deletions

View File

@ -18,19 +18,19 @@ class OrphanedBlockRewardTest(BitcoinTestFramework):
def run_test(self):
# Generate some blocks and obtain some coins on node 0. We send
# some balance to node 1, which will hold it as a single coin.
self.nodes[0].generate(150)
self.generate(self.nodes[0], 150)
self.nodes[0].sendtoaddress(self.nodes[1].getnewaddress(), 10)
self.nodes[0].generate(1)
self.generate(self.nodes[0], 1)
# Get a block reward with node 1 and remember the block so we can orphan
# it later.
self.sync_blocks()
blk = self.nodes[1].generate(1)[0]
blk = self.generate(self.nodes[1], 1)[0]
self.sync_blocks()
# Let the block reward mature and send coins including both
# the existing balance and the block reward.
self.nodes[0].generate(150)
self.generate(self.nodes[0], 150)
self.sync_blocks()
assert_equal(self.nodes[1].getbalance(), 10 + 25)
txid = self.nodes[1].sendtoaddress(self.nodes[0].getnewaddress(), 30)
@ -38,7 +38,7 @@ class OrphanedBlockRewardTest(BitcoinTestFramework):
# Orphan the block reward and make sure that the original coins
# from the wallet can still be spent.
self.nodes[0].invalidateblock(blk)
self.nodes[0].generate(152)
self.generate(self.nodes[0], 152)
self.sync_blocks()
# Without the following abandontransaction call, the coins are
# not considered available yet.