aboutsummaryrefslogtreecommitdiff
path: root/qa/rpc-tests/bip65-cltv.py
diff options
context:
space:
mode:
authorJohn Newbery <john@johnnewbery.com>2017-03-07 14:08:59 -0500
committerJohn Newbery <john@johnnewbery.com>2017-03-15 11:56:25 -0400
commitc9bd0f64212cd600daf30c9c59035bfe9f07b81b (patch)
tree9f587fadcbbd92fb983a770af4a1cf5084bc8b01 /qa/rpc-tests/bip65-cltv.py
parentce01e6226ce52b88c644b0cb89852278edbdf33b (diff)
Fix RPC failure testing (2 of 2)
Commit 9db8eecac1c713c760c0217b6acb7455c657fa8b improved the assert_raises_jsonrpc() function for better testing of RPC failure modes. This commit completes the job by removing remaining broken try-except RPC testing from the individual test cases and replacing it with calls to assert_raises_jsonrpc().
Diffstat (limited to 'qa/rpc-tests/bip65-cltv.py')
-rwxr-xr-xqa/rpc-tests/bip65-cltv.py8
1 files changed, 2 insertions, 6 deletions
diff --git a/qa/rpc-tests/bip65-cltv.py b/qa/rpc-tests/bip65-cltv.py
index c9d02a98f3..7f13bb9952 100755
--- a/qa/rpc-tests/bip65-cltv.py
+++ b/qa/rpc-tests/bip65-cltv.py
@@ -69,12 +69,8 @@ class BIP65Test(BitcoinTestFramework):
if (self.nodes[0].getblockcount() != cnt + 1051):
raise AssertionError("Failed to mine a version=4 block")
- # Mine 1 old-version blocks
- try:
- self.nodes[1].generate(1)
- raise AssertionError("Succeeded to mine a version=3 block after 950 version=4 blocks")
- except JSONRPCException:
- pass
+ # Mine 1 old-version blocks. This should fail
+ assert_raises_jsonrpc(-1,"CreateNewBlock: TestBlockValidity failed: bad-version(0x00000003)", self.nodes[1].generate, 1)
self.sync_all()
if (self.nodes[0].getblockcount() != cnt + 1051):
raise AssertionError("Accepted a version=3 block after 950 version=4 blocks")