mirror of
https://github.com/XRPLF/rippled.git
synced 2026-09-26 23:19:07 +00:00
The sanity bound required the value to be strictly positive, which rejected three of the four readings the gauge can legitimately produce: a negative count once the validator list has expired, the -1 sentinel for "no published list fetched", and +inf for a config-listed list that never expires. The negative case is the one that matters. It is the signal that expiry has already passed, so the gauge deliberately does not clamp at zero, and a gate that rejects it would fail exactly when an operator most needs the reading. The -1 sentinel already violated the bound and had simply never been hit, because the validation cluster always fetches a published list. The floor is now a century, which still catches a broken clock. Detecting the unsigned wrap this bound used to hide moves to the MetricsRegistry::daysUntil unit tests, which are deterministic and do not need a running cluster.