From 071d9a4ca646d411555919c37150f5522b079a31 Mon Sep 17 00:00:00 2001 From: Csaba Kiraly Date: Tue, 15 Apr 2025 08:36:49 +0200 Subject: [PATCH] better comments Signed-off-by: Csaba Kiraly --- p2p/metrics.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/p2p/metrics.go b/p2p/metrics.go index 6bef0b102e..30da481bf0 100644 --- a/p2p/metrics.go +++ b/p2p/metrics.go @@ -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 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) ) @@ -91,8 +91,8 @@ func markDialError(err error) { case errors.As(err, &phe): dialProtoHandshakeError.Mark(1) default: - // catch all for any other error, not supposed to happen, only here for cross-checking - // that all errors are captured by the above meters + // dialOtherError is a catch-all for any other error, which are not supposed to happen. + // Only here for cross-checking that all errors are captured by the above meters. dialOtherError.Mark(1) } }