Skip to content

Commit

Permalink
test: add bip157 coverage for (start height > stop height) disconnect
Browse files Browse the repository at this point in the history
  • Loading branch information
theStack committed Aug 7, 2023
1 parent 63e90e1 commit 2ab7952
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/functional/p2p_blockfilters.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,14 @@ def run_test(self):
stop_hash=123456789,
), "requested invalid block hash"
),
(
# Request with (start block height > stop block height) results in disconnection.
msg_getcfheaders(
filter_type=FILTER_TYPE_BASIC,
start_height=1000,
stop_hash=int(self.nodes[0].getblockhash(999), 16),
), "sent invalid getcfilters/getcfheaders with start height 1000 and stop height 999"
),
]
for request, expected_log_msg in requests:
peer_0 = self.nodes[0].add_p2p_connection(P2PInterface())
Expand Down

0 comments on commit 2ab7952

Please sign in to comment.