Skip to content

Commit fe56d9b

Browse files
MarcoFalkePastaPastaPasta
authored andcommitted
Merge bitcoin#24698: test: -peerblockfilters without -blockfilterindex raises an error
d6bc232 test: -peerblockfilters without -blockfilterindex raises an error (brunoerg) Pull request description: This PR adds test coverage for the following init error: https://github.com/bitcoin/bitcoin/blob/2a3e8fb3592e42300ec96c9f6724e15346e30ea7/src/init.cpp#L850 Setting -peerblockfilters without -blockfilterindex should raise an error when initializing. ACKs for top commit: ccdle12: Tested ACK bitcoin@d6bc232 Tree-SHA512: e740c2ccde6bb1bb8381bb676a6d01bd5746cf9ce0c8dadd62067a6b9b380027bfe8b8cdeae9846a0ab18385f3dc5dff607fe5274cb55107d47470db00015fb2
1 parent 3cabce6 commit fe56d9b

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

test/functional/p2p_blockfilters.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,12 @@ def run_test(self):
245245
peer_0.send_message(request)
246246
peer_0.wait_for_disconnect()
247247

248+
self.log.info("Test -peerblockfilters without -blockfilterindex raises an error")
249+
self.stop_node(0)
250+
self.nodes[0].extra_args = ["-peerblockfilters"]
251+
msg = "Error: Cannot set -peerblockfilters without -blockfilterindex."
252+
self.nodes[0].assert_start_raises_init_error(expected_msg=msg)
253+
248254

249255
def compute_last_header(prev_header, hashes):
250256
"""Compute the last filter header from a starting header and a sequence of filter hashes."""

0 commit comments

Comments
 (0)