aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2019-02-13 16:51:27 -0500
committerMarcoFalke <falke.marco@gmail.com>2019-02-20 13:34:16 -0500
commitfa4ce7038d444defe0b98a30097174c278054a33 (patch)
tree48d5aaa962b2bf2d9d7365fd9276a3b5821fadb9 /test
parentfa05626ca7a0fe896ac554c79eaea4c36acdf861 (diff)
rpc: Actually throw help when passed invalid number of params
Diffstat (limited to 'test')
-rwxr-xr-xtest/functional/rpc_getblockstats.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/functional/rpc_getblockstats.py b/test/functional/rpc_getblockstats.py
index ca9e24367a..feba16f1b3 100755
--- a/test/functional/rpc_getblockstats.py
+++ b/test/functional/rpc_getblockstats.py
@@ -178,5 +178,10 @@ class GetblockstatsTest(BitcoinTestFramework):
assert_raises_rpc_error(-5, 'Block not found', self.nodes[0].getblockstats,
hash_or_height='000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f')
+ # Invalid number of args
+ assert_raises_rpc_error(-1, 'getblockstats hash_or_height ( stats )', self.nodes[0].getblockstats, '00', 1, 2)
+ assert_raises_rpc_error(-1, 'getblockstats hash_or_height ( stats )', self.nodes[0].getblockstats)
+
+
if __name__ == '__main__':
GetblockstatsTest().main()