Skip to content

Commit

Permalink
Merge #25192: test: add coverage for unknown value to -blockfilterindex
Browse files Browse the repository at this point in the history
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
  • Loading branch information
MacroFake committed May 25, 2022
2 parents bd57b4e + 295ff61 commit 8c721ff
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions test/functional/p2p_blockfilters.py
Expand Up @@ -250,6 +250,11 @@ def run_test(self):
msg = "Error: Cannot set -peerblockfilters without -blockfilterindex."
self.nodes[0].assert_start_raises_init_error(expected_msg=msg)

self.log.info("Test unknown value to -blockfilterindex raises an error")
self.nodes[0].extra_args = ["-blockfilterindex=abc"]
msg = "Error: Unknown -blockfilterindex value abc."
self.nodes[0].assert_start_raises_init_error(expected_msg=msg)

self.log.info("Test -blockfilterindex with -reindex-chainstate raises an error")
self.nodes[0].assert_start_raises_init_error(
expected_msg='Error: -reindex-chainstate option is not compatible with -blockfilterindex. '
Expand Down

0 comments on commit 8c721ff

Please sign in to comment.