mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-05-25 01:09:28 +00:00
Require substantially more samples before a peer's request-latency EMA becomes eligible for protection. A 10-sample floor was too low: a peer hitting 10 fast replies in a short burst could earn protection before the slow alpha=0.01 EMA had moved meaningfully away from the bootstrap value. At ~70-sample EMA half-life, a 100-sample floor means the EMA has been refined through several half-lives before it can affect dropping decisions. Updates the dropper tests that previously used RequestSamples=50 to use peerstats.MinLatencySamples so they stay robust to future value changes. Design notes and a test comment reference the new value. |
||
|---|---|---|
| .. | ||
| peerstats.go | ||
| peerstats_test.go | ||