diff options
author | klementtan <klement.tan@ninjavan.co> | 2021-04-17 19:08:47 +0800 |
---|---|---|
committer | klementtan <klement.tan@ninjavan.co> | 2021-04-18 12:30:58 +0800 |
commit | a41149426168b8ea96099f10576022c6a09033d1 (patch) | |
tree | ff652240d9992f138c94afad7af40ffe65f84fc9 /test | |
parent | f5e8bcf985df212c901b1e3e1ed0b68933c321f6 (diff) |
rpc: Improve getblock error message for invalid data type.
Diffstat (limited to 'test')
-rwxr-xr-x | test/functional/rpc_blockchain.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/test/functional/rpc_blockchain.py b/test/functional/rpc_blockchain.py index 821409ccc1..ac53a280b4 100755 --- a/test/functional/rpc_blockchain.py +++ b/test/functional/rpc_blockchain.py @@ -410,6 +410,9 @@ class BlockchainTest(BitcoinTestFramework): self.log.info("Test that getblock with verbosity 2 still works with pruned Undo data") datadir = get_datadir_path(self.options.tmpdir, 0) + self.log.info("Test that getblock with invalid verbosity type returns proper error message") + assert_raises_rpc_error(-1, "JSON value is not an integer as expected", node.getblock, blockhash, "2") + def move_block_file(old, new): old_path = os.path.join(datadir, self.chain, 'blocks', old) new_path = os.path.join(datadir, self.chain, 'blocks', new) |