mirror of
https://github.com/Retropex/bitcoin.git
synced 2025-05-14 12:10:42 +02:00
test: add bip157 coverage for (start height > stop height) disconnect
This commit is contained in:
parent
63e90e1d3f
commit
2ab7952bda
@ -247,6 +247,14 @@ class CompactFiltersTest(BitcoinTestFramework):
|
|||||||
stop_hash=123456789,
|
stop_hash=123456789,
|
||||||
), "requested invalid block hash"
|
), "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:
|
for request, expected_log_msg in requests:
|
||||||
peer_0 = self.nodes[0].add_p2p_connection(P2PInterface())
|
peer_0 = self.nodes[0].add_p2p_connection(P2PInterface())
|
||||||
|
Loading…
Reference in New Issue
Block a user