Skip to content

Commit 2ab7952

Browse files
committed
test: add bip157 coverage for (start height > stop height) disconnect
1 parent 63e90e1 commit 2ab7952

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

test/functional/p2p_blockfilters.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,14 @@ def run_test(self):
247247
stop_hash=123456789,
248248
), "requested invalid block hash"
249249
),
250+
(
251+
# Request with (start block height > stop block height) results in disconnection.
252+
msg_getcfheaders(
253+
filter_type=FILTER_TYPE_BASIC,
254+
start_height=1000,
255+
stop_hash=int(self.nodes[0].getblockhash(999), 16),
256+
), "sent invalid getcfilters/getcfheaders with start height 1000 and stop height 999"
257+
),
250258
]
251259
for request, expected_log_msg in requests:
252260
peer_0 = self.nodes[0].add_p2p_connection(P2PInterface())

0 commit comments

Comments
 (0)