eth/protocols/eth: fix handshake timeout metrics classification

This commit is contained in:
ANtutov 2026-01-06 18:12:54 +02:00 committed by GitHub
parent eaaa5b716d
commit d09ece6b6e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -191,7 +191,13 @@ func markError(p *Peer, err error) {
return
}
m := meters.get(p.Inbound())
switch errors.Unwrap(err) {
base := errors.Unwrap(err)
if base == nil {
base = err
}
switch base {
case errNetworkIDMismatch:
m.networkIDMismatch.Mark(1)
case errProtocolVersionMismatch: