mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-02-26 15:47:21 +00:00
Our metrics related to dial errors were off. The original error was not wrapped, so the caller function had no chance of picking it up. Therefore the most common error, which is "TooManyPeers", was not correctly counted. The metrics were originally introduced in https://github.com/ethereum/go-ethereum/pull/27621 I was thinking of various possible solutions. - the one proposed here wraps both the new error and the origial error. It is not a pattern we use in other parts of the code, but works. This is maybe the smallest possible change. - as an alternate, I could write a proper `errProtoHandshakeError` with it's own wrapped error - finally, I'm not even sure we need `errProtoHandshakeError`, maybe we could just pass up the original error. --------- Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com> Co-authored-by: Felix Lange <fjl@twurst.com> |
||
|---|---|---|
| .. | ||
| discover | ||
| dnsdisc | ||
| enode | ||
| enr | ||
| msgrate | ||
| nat | ||
| netutil | ||
| pipes | ||
| rlpx | ||
| tracker | ||
| config.go | ||
| config_toml.go | ||
| dial.go | ||
| dial_test.go | ||
| message.go | ||
| message_test.go | ||
| metrics.go | ||
| peer.go | ||
| peer_error.go | ||
| peer_test.go | ||
| protocol.go | ||
| server.go | ||
| server_nat.go | ||
| server_nat_test.go | ||
| server_test.go | ||
| transport.go | ||
| transport_test.go | ||
| util.go | ||
| util_test.go | ||