go-ethereum/cmd/devp2p/internal
rayoo 5013c7931a cmd/devp2p/internal/ethtest: fix disconnect decoding in status exchange
The disconnect-message branch in statusExchange had two bugs that are
the twin of the one fixed in rlpxcmd.go by #34781:
the error return from rlp.DecodeBytes was ignored, so decode failures
silently produced an "invalid disconnect message" error with no
context; and the decoder assumed the spec-compliant list form
exclusively, while older geth and some other implementations send the
reason as a bare byte.

Add a decodeDisconnect helper that accepts both wire forms (matching
the legacy-tolerant behavior in p2p.decodeDisconnectMessage) and, on
decode failure, include the raw payload so operators can see exactly
what the peer sent. Add a unit test for the decoder covering both
forms plus the empty-payload error path.
2026-04-24 15:26:53 +08:00
..
ethtest cmd/devp2p/internal/ethtest: fix disconnect decoding in status exchange 2026-04-24 15:26:53 +08:00
v4test cmd/devp2p/internal/v4test: add test for ENRRequest (#32303) 2025-07-31 12:13:36 +02:00
v5test cmd/devp2p/internal/v5test: fix hive test for discv5 findnode results (#34043) 2026-04-14 12:15:39 +02:00