mirror of
https://github.com/dashpay/dash.git
synced 2024-12-26 04:22:55 +01:00
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
This commit is contained in:
parent
36d2dc7251
commit
bce39fe5c6
@ -55,5 +55,11 @@ class GetBlockFilterTest(BitcoinTestFramework):
|
|||||||
genesis_hash = self.nodes[0].getblockhash(0)
|
genesis_hash = self.nodes[0].getblockhash(0)
|
||||||
assert_raises_rpc_error(-5, "Unknown filtertype", self.nodes[0].getblockfilter, genesis_hash, "unknown")
|
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__':
|
if __name__ == '__main__':
|
||||||
GetBlockFilterTest().main()
|
GetBlockFilterTest().main()
|
||||||
|
Loading…
Reference in New Issue
Block a user