tests: Fix ADVERT_PATH packet fixture

- Use packet type 0x16 and include the four-byte timestamp so the
  fixture exercises ADVERT_PATH parsing instead of PRIVATE_KEY handling.
- Preserve the embedded zero byte and existing path assertions.
This commit is contained in:
Kyle Manna
2026-09-19 12:17:02 -07:00
parent d48b941d56
commit 170f94e0bd
+2 -2
View File
@@ -286,10 +286,10 @@ async def test_advert_path_preserves_embedded_zero_bytes():
dispatcher = _CapturingDispatcher()
reader = MessageReader(dispatcher)
# ADVERT_PATH (0x0e), 2 hops, 3-byte hashes.
# ADVERT_PATH (0x16), timestamp 1, 2 hops, 3-byte hashes.
# path_len byte: hash mode 2 (3 bytes) + 2 hops = 0x82.
# The first hash deliberately contains an embedded 0x00 byte.
packet = bytearray.fromhex("0e8212003456789a")
packet = bytearray.fromhex("16010000008212003456789a")
await reader.handle_rx(packet)