go-ethereum/eth/peerstats
Csaba Kiraly b6b6345be9 eth: rename NotifyRequestLatency to NotifyRequestResult, track success/timeout counts
Replace NotifyRequestLatency(peer, latency) with
NotifyRequestResult(peer, latency, timeout). The new timeout bool
tells peerstats whether the request was answered or timed out.

Per-peer RequestSuccesses and RequestTimeouts counters replace the
single RequestSamples field — any two of the three are derivable, so
we keep the two primary counters and derive the total
(successes + timeouts) where needed (e.g. the MinLatencySamples
guard in the dropper).

The latency EMA continues to use the timeout value for timed-out
requests, penalizing slow peers as before. The success/timeout
counters are exposed as statistics only — no protection category
uses them yet.
2026-04-20 09:30:52 +02:00
..
peerstats.go eth: rename NotifyRequestLatency to NotifyRequestResult, track success/timeout counts 2026-04-20 09:30:52 +02:00
peerstats_test.go eth: rename NotifyRequestLatency to NotifyRequestResult, track success/timeout counts 2026-04-20 09:30:52 +02:00