From fa4ce7038d444defe0b98a30097174c278054a33 Mon Sep 17 00:00:00 2001 From: MarcoFalke Date: Wed, 13 Feb 2019 16:51:27 -0500 Subject: rpc: Actually throw help when passed invalid number of params --- test/functional/rpc_getblockstats.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'test') 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() -- cgit v1.2.3