aboutsummaryrefslogtreecommitdiff
path: root/test/functional/feature_pruning.py
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2019-02-19 17:43:44 -0500
committerMarcoFalke <falke.marco@gmail.com>2019-03-02 10:51:35 -0500
commitfa0e65b77264476c61832542ab1a9dbedcc738ea (patch)
tree68267ce32f8700ec01234eca1faa21cb1a5ccd8e /test/functional/feature_pruning.py
parentfab5a1e0f492f920270c661954802749dfac5fa1 (diff)
downloadbitcoin-fa0e65b77264476c61832542ab1a9dbedcc738ea.tar.xz
scripted-diff: test: Remove brackets after assert
-BEGIN VERIFY SCRIPT- sed -i --regexp-extended -e 's/assert ?\((.+)\)(( )*)?(#.*)?$/assert \1\3\3\4/g' $(git grep -l --extended-regexp 'assert ?\(' test) -END VERIFY SCRIPT-
Diffstat (limited to 'test/functional/feature_pruning.py')
-rwxr-xr-xtest/functional/feature_pruning.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/test/functional/feature_pruning.py b/test/functional/feature_pruning.py
index 3e1ba88f0a..fe8e1cde2f 100755
--- a/test/functional/feature_pruning.py
+++ b/test/functional/feature_pruning.py
@@ -151,7 +151,7 @@ class PruneTest(BitcoinTestFramework):
self.nodes[1].invalidateblock(curhash)
curhash = self.nodes[1].getblockhash(invalidheight - 1)
- assert(self.nodes[1].getblockcount() == invalidheight - 1)
+ assert self.nodes[1].getblockcount() == invalidheight - 1
self.log.info("New best height: %d" % self.nodes[1].getblockcount())
# Reboot node1 to clear those giant tx's from mempool
@@ -219,17 +219,17 @@ class PruneTest(BitcoinTestFramework):
blocks_to_mine = first_reorg_height + 1 - self.mainchainheight
self.log.info("Rewind node 0 to prev main chain to mine longer chain to trigger redownload. Blocks needed: %d" % blocks_to_mine)
self.nodes[0].invalidateblock(curchainhash)
- assert(self.nodes[0].getblockcount() == self.mainchainheight)
- assert(self.nodes[0].getbestblockhash() == self.mainchainhash2)
+ assert self.nodes[0].getblockcount() == self.mainchainheight
+ assert self.nodes[0].getbestblockhash() == self.mainchainhash2
goalbesthash = self.nodes[0].generate(blocks_to_mine)[-1]
goalbestheight = first_reorg_height + 1
self.log.info("Verify node 2 reorged back to the main chain, some blocks of which it had to redownload")
# Wait for Node 2 to reorg to proper height
wait_until(lambda: self.nodes[2].getblockcount() >= goalbestheight, timeout=900)
- assert(self.nodes[2].getbestblockhash() == goalbesthash)
+ assert self.nodes[2].getbestblockhash() == goalbesthash
# Verify we can now have the data for a block previously pruned
- assert(self.nodes[2].getblock(self.forkhash)["height"] == self.forkheight)
+ assert self.nodes[2].getblock(self.forkhash)["height"] == self.forkheight
def manual_test(self, node_number, use_timestamp):
# at this point, node has 995 blocks and has not yet run in prune mode