aboutsummaryrefslogtreecommitdiff
path: root/test/functional/pruning.py
diff options
context:
space:
mode:
authorJohn Newbery <john@johnnewbery.com>2017-11-01 10:41:28 -0400
committerMarcoFalke <falke.marco@gmail.com>2017-11-01 10:42:30 -0400
commitd94fc336c47b5fd0f42217806faad1aa201b9d63 (patch)
tree1603fa9706a06bb0eb1ccaa5e9f78390896bbedd /test/functional/pruning.py
parent623de0acbb7a586adba8d1f9a64c77fabb0e98a4 (diff)
downloadbitcoin-d94fc336c47b5fd0f42217806faad1aa201b9d63.tar.xz
scripted-diff: rename assert_raises_jsonrpc to assert_raises_rpc error
-BEGIN VERIFY SCRIPT- sed -i 's/assert_raises_jsonrpc/assert_raises_rpc_error/g' test/functional/*py test/functional/test_framework/*py -END VERIFY SCRIPT- Github-Pull: #10853 Rebased-From: 47ba8cf71e9a3a6f7452488fc9ab3b350f0fae36
Diffstat (limited to 'test/functional/pruning.py')
-rwxr-xr-xtest/functional/pruning.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/functional/pruning.py b/test/functional/pruning.py
index a4afbd46d7..1b0f0ba1cd 100755
--- a/test/functional/pruning.py
+++ b/test/functional/pruning.py
@@ -185,7 +185,7 @@ class PruneTest(BitcoinTestFramework):
def reorg_back(self):
# Verify that a block on the old main chain fork has been pruned away
- assert_raises_jsonrpc(-1, "Block not available (pruned data)", self.nodes[2].getblock, self.forkhash)
+ assert_raises_rpc_error(-1, "Block not available (pruned data)", self.nodes[2].getblock, self.forkhash)
self.log.info("Will need to redownload block %d" % self.forkheight)
# Verify that we have enough history to reorg back to the fork point
@@ -232,7 +232,7 @@ class PruneTest(BitcoinTestFramework):
self.start_node(node_number)
node = self.nodes[node_number]
assert_equal(node.getblockcount(), 995)
- assert_raises_jsonrpc(-1, "not in prune mode", node.pruneblockchain, 500)
+ assert_raises_rpc_error(-1, "not in prune mode", node.pruneblockchain, 500)
# now re-start in manual pruning mode
self.stop_node(node_number)
@@ -265,14 +265,14 @@ class PruneTest(BitcoinTestFramework):
return os.path.isfile(self.options.tmpdir + "/node{}/regtest/blocks/blk{:05}.dat".format(node_number, index))
# should not prune because chain tip of node 3 (995) < PruneAfterHeight (1000)
- assert_raises_jsonrpc(-1, "Blockchain is too short for pruning", node.pruneblockchain, height(500))
+ assert_raises_rpc_error(-1, "Blockchain is too short for pruning", node.pruneblockchain, height(500))
# mine 6 blocks so we are at height 1001 (i.e., above PruneAfterHeight)
node.generate(6)
assert_equal(node.getblockchaininfo()["blocks"], 1001)
# negative heights should raise an exception
- assert_raises_jsonrpc(-8, "Negative", node.pruneblockchain, -10)
+ assert_raises_rpc_error(-8, "Negative", node.pruneblockchain, -10)
# height=100 too low to prune first block file so this is a no-op
prune(100)