scripted-diff: Remove redundant sync_all and sync_blocks

The sync calls are redundant after a call to generate, because generate
already syncs itself.

-BEGIN VERIFY SCRIPT-
perl -0777 -pi -e 's/(generate[^\n]*\)[^\n]*)(\n|\s)+self.sync_(all|blocks)\([^\)]*\)\n/\1\n/g' $(git grep -l generate ./test)
-END VERIFY SCRIPT-
This commit is contained in:
MarcoFalke
2021-07-28 12:12:50 +02:00
parent fad13991ae
commit fa974f1f14
47 changed files with 0 additions and 160 deletions

View File

@ -26,12 +26,10 @@ class OrphanedBlockRewardTest(BitcoinTestFramework):
# it later.
self.sync_blocks()
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.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)
@ -39,7 +37,6 @@ class OrphanedBlockRewardTest(BitcoinTestFramework):
# from the wallet can still be spent.
self.nodes[0].invalidateblock(blk)
self.generate(self.nodes[0], 152)
self.sync_blocks()
# Without the following abandontransaction call, the coins are
# not considered available yet.
assert_equal(self.nodes[1].getbalances()["mine"], {