better comments

Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
This commit is contained in:
Csaba Kiraly 2025-04-15 08:36:49 +02:00
parent f724db56a3
commit 071d9a4ca6
No known key found for this signature in database
GPG key ID: 0FE274EE8C95166E

View file

@ -60,7 +60,7 @@ var (
dialEncHandshakeError = metrics.NewRegisteredMeter("p2p/dials/error/rlpx/enc", nil) // EOF; connection reset during handshake; message too big; i/o timeout dialEncHandshakeError = metrics.NewRegisteredMeter("p2p/dials/error/rlpx/enc", nil) // EOF; connection reset during handshake; message too big; i/o timeout
dialProtoHandshakeError = metrics.NewRegisteredMeter("p2p/dials/error/rlpx/proto", nil) // EOF dialProtoHandshakeError = metrics.NewRegisteredMeter("p2p/dials/error/rlpx/proto", nil) // EOF
// capure the rest of errors that are not handled by the above meters // capture the rest of errors that are not handled by the above meters
dialOtherError = metrics.NewRegisteredMeter("p2p/dials/error/other", nil) dialOtherError = metrics.NewRegisteredMeter("p2p/dials/error/other", nil)
) )
@ -91,8 +91,8 @@ func markDialError(err error) {
case errors.As(err, &phe): case errors.As(err, &phe):
dialProtoHandshakeError.Mark(1) dialProtoHandshakeError.Mark(1)
default: default:
// catch all for any other error, not supposed to happen, only here for cross-checking // dialOtherError is a catch-all for any other error, which are not supposed to happen.
// that all errors are captured by the above meters // Only here for cross-checking that all errors are captured by the above meters.
dialOtherError.Mark(1) dialOtherError.Mark(1)
} }
} }