scripted-diff: use self.sync_* methods

-BEGIN VERIFY SCRIPT-
sed -i -e 's/sync_blocks(self.nodes)/self.sync_blocks()/g'     $(git grep -l 'sync_blocks(self.nodes)'   ./test/functional/*.py)
sed -i -e 's/sync_mempools(self.nodes)/self.sync_mempools()/g' $(git grep -l 'sync_mempools(self.nodes)' ./test/functional/*.py)

sed -i -e 's/  sync_blocks(/  self.sync_blocks(/g'     $(git grep -l sync_blocks   ./test/functional/*.py)
sed -i -e 's/  sync_mempools(/  self.sync_mempools(/g' $(git grep -l sync_mempools ./test/functional/*.py)
-END VERIFY SCRIPT-
This commit is contained in:
MarcoFalke
2019-04-06 18:19:45 -04:00
parent faf77f9b90
commit fa16a09215
24 changed files with 86 additions and 86 deletions

View File

@@ -75,9 +75,9 @@ class WalletBackupTest(BitcoinTestFramework):
# Have the miner (node3) mine a block.
# Must sync mempools before mining.
sync_mempools(self.nodes)
self.sync_mempools()
self.nodes[3].generate(1)
sync_blocks(self.nodes)
self.sync_blocks()
# As above, this mirrors the original bash test.
def start_three(self):
@@ -102,13 +102,13 @@ class WalletBackupTest(BitcoinTestFramework):
def run_test(self):
self.log.info("Generating initial blockchain")
self.nodes[0].generate(1)
sync_blocks(self.nodes)
self.sync_blocks()
self.nodes[1].generate(1)
sync_blocks(self.nodes)
self.sync_blocks()
self.nodes[2].generate(1)
sync_blocks(self.nodes)
self.sync_blocks()
self.nodes[3].generate(100)
sync_blocks(self.nodes)
self.sync_blocks()
assert_equal(self.nodes[0].getbalance(), 50)
assert_equal(self.nodes[1].getbalance(), 50)
@@ -165,7 +165,7 @@ class WalletBackupTest(BitcoinTestFramework):
self.log.info("Re-starting nodes")
self.start_three()
sync_blocks(self.nodes)
self.sync_blocks()
assert_equal(self.nodes[0].getbalance(), balance0)
assert_equal(self.nodes[1].getbalance(), balance1)
@@ -189,7 +189,7 @@ class WalletBackupTest(BitcoinTestFramework):
self.nodes[1].importwallet(os.path.join(self.nodes[1].datadir, 'wallet.dump'))
self.nodes[2].importwallet(os.path.join(self.nodes[2].datadir, 'wallet.dump'))
sync_blocks(self.nodes)
self.sync_blocks()
assert_equal(self.nodes[0].getbalance(), balance0)
assert_equal(self.nodes[1].getbalance(), balance1)