aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2021-03-04 08:37:05 +0100
committerMarcoFalke <falke.marco@gmail.com>2021-03-04 08:37:10 +0100
commitd099894ec124598b37bd4a0a41b2c93e0034108f (patch)
tree901d49ce8a6cab66caa262f5ecd1c99f44bc3a9b /test
parent47b99ab1a9e918022ea13f54765f5b4e6aad6140 (diff)
parent233a886b4221190a3e53128162d708266494576e (diff)
Merge #20969: test: check that getblockfilter RPC fails without block filter index
233a886b4221190a3e53128162d708266494576e test: check that getblockfilter RPC fails without block filter index (Sebastian Falbesoner) Pull request description: If a node was started without compact block filter index (parameter `--blockfilterindex=0`), the `getblockfilter` RPC call should fail. ACKs for top commit: MarcoFalke: review ACK 233a886b4221190a3e53128162d708266494576e Tree-SHA512: c8824373fad7d1de2dcb43c1d9541d736b478235be243080d2b7479c2588eac0e5722337ec1307394b331e0002fbcabb368e4955c2dc98dd5fce76d8c089e8a1
Diffstat (limited to 'test')
-rwxr-xr-xtest/functional/rpc_getblockfilter.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/functional/rpc_getblockfilter.py b/test/functional/rpc_getblockfilter.py
index 044dbd35bf..a99e50f29f 100755
--- a/test/functional/rpc_getblockfilter.py
+++ b/test/functional/rpc_getblockfilter.py
@@ -54,5 +54,11 @@ class GetBlockFilterTest(BitcoinTestFramework):
genesis_hash = self.nodes[0].getblockhash(0)
assert_raises_rpc_error(-5, "Unknown filtertype", self.nodes[0].getblockfilter, genesis_hash, "unknown")
+ # Test getblockfilter fails on node without compact block filter index
+ self.restart_node(0, extra_args=["-blockfilterindex=0"])
+ for filter_type in FILTER_TYPES:
+ assert_raises_rpc_error(-1, "Index is not enabled for filtertype {}".format(filter_type),
+ self.nodes[0].getblockfilter, genesis_hash, filter_type)
+
if __name__ == '__main__':
GetBlockFilterTest().main()