mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-05-09 17:46:37 +00:00
The rlpx ping command mishandled disconnect responses on two counts:
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.
Accept both wire forms (matching the legacy-tolerant behavior already
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.
|
||
|---|---|---|
| .. | ||
| abidump | ||
| abigen | ||
| blsync | ||
| clef | ||
| devp2p | ||
| era | ||
| ethkey | ||
| evm | ||
| fetchpayload | ||
| geth | ||
| keeper | ||
| rlpdump | ||
| utils | ||
| workload | ||