mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-06-30 02:31:05 +02:00
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:
@ -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"], {
|
||||
|
Reference in New Issue
Block a user