mirror of
https://github.com/pyMC-dev/pyMC_Repeater.git
synced 2026-08-09 18:33:14 +02:00
test(engine): stop building reserved-version packets in fixtures
Firmware's Dispatcher::tryParsePacket drops any payload version above 0 at parse, and core's Packet.read_from now enforces the same rule, so a version-1 routed ACK can never reach the relay; the wire vector exercising that unreachable input is removed (header regeneration is still covered by the remaining vectors, including transport-direct). The advert fixture also OR'd the version-1 bit into its header; it now builds the version-0 header that PacketBuilder.create_advert emits.
This commit is contained in:
@@ -692,8 +692,10 @@ class TestForwardRoutedAck:
|
||||
|
||||
# Literal MeshCore-format routed-ACK frames (Packet::writeTo layout). MeshCore's
|
||||
# routeDirectRecvAcks re-emits through createAck: the header is rebuilt from
|
||||
# scratch (payload type ACK, route DIRECT, version bits cleared, transport codes
|
||||
# dropped) and this node is removed from the path. Independent wire fixtures —
|
||||
# scratch (payload type ACK, route DIRECT, transport codes dropped) and this
|
||||
# node is removed from the path. Non-zero-version inputs are not represented
|
||||
# here: firmware's Dispatcher::tryParsePacket (and our Packet.read_from) drops
|
||||
# them at parse, so they can never reach the relay. Independent wire fixtures —
|
||||
# do NOT rebuild them through Packet.write_to()/PathUtils.
|
||||
FIRMWARE_ROUTED_ACK_VECTORS = (
|
||||
# header 0x0E = ACK<<2 | ROUTE_DIRECT; path_len 0x02 = 1-byte/2-hop;
|
||||
@@ -719,13 +721,6 @@ FIRMWARE_ROUTED_ACK_VECTORS = (
|
||||
bytes.fromhex("0E01CC4DABAF95"),
|
||||
id="transport-direct-1-byte-2-hop",
|
||||
),
|
||||
# header 0x4E = version bit set on a direct ACK; createAck clears it.
|
||||
pytest.param(
|
||||
bytes([0xAB]),
|
||||
bytes.fromhex("4E02ABCC4DABAF95"),
|
||||
bytes.fromhex("0E01CC4DABAF95"),
|
||||
id="direct-version-bits-cleared",
|
||||
),
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user