From 170f94e0bd3bab60bd75b15858e809ac1d259997 Mon Sep 17 00:00:00 2001 From: Kyle Manna Date: Sat, 19 Sep 2026 12:17:02 -0700 Subject: [PATCH] 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. --- tests/unit/test_reader.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/unit/test_reader.py b/tests/unit/test_reader.py index 2abc906..335a114 100644 --- a/tests/unit/test_reader.py +++ b/tests/unit/test_reader.py @@ -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)