mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-26 14:46:42 +00:00
better comments
Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
This commit is contained in:
parent
f724db56a3
commit
071d9a4ca6
1 changed files with 3 additions and 3 deletions
|
|
@ -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)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue