Skip to content

Commit 8c721ff

Browse files
author
MacroFake
committed
Merge bitcoin/bitcoin#25192: test: add coverage for unknown value to -blockfilterindex
295ff61 test: add coverage for unknown -blockfilterindex (brunoerg) Pull request description: This PR adds test coverage for the following init error: https://github.com/bitcoin/bitcoin/blob/44037a29129a830fd9c9580f0818387756cfd7d3/src/init.cpp#L844 Passing an unknown value to -blockfilterindex should throw an error. ACKs for top commit: dunxen: cr-ACK 295ff61 Tree-SHA512: 1444903cf0696406c485ce0575f951d527fe7d699094d5845622c0b57c954d6d7dcf1e78ef0c4e8b9b26f53b79583f07fec0e8d8e7f04aa744d2a8cd98329db9
2 parents bd57b4e + 295ff61 commit 8c721ff

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

test/functional/p2p_blockfilters.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,11 @@ def run_test(self):
250250
msg = "Error: Cannot set -peerblockfilters without -blockfilterindex."
251251
self.nodes[0].assert_start_raises_init_error(expected_msg=msg)
252252

253+
self.log.info("Test unknown value to -blockfilterindex raises an error")
254+
self.nodes[0].extra_args = ["-blockfilterindex=abc"]
255+
msg = "Error: Unknown -blockfilterindex value abc."
256+
self.nodes[0].assert_start_raises_init_error(expected_msg=msg)
257+
253258
self.log.info("Test -blockfilterindex with -reindex-chainstate raises an error")
254259
self.nodes[0].assert_start_raises_init_error(
255260
expected_msg='Error: -reindex-chainstate option is not compatible with -blockfilterindex. '

0 commit comments

Comments
 (0)