mirror of
https://github.com/XRPLF/rippled.git
synced 2026-09-27 15:28:03 +00:00
unl_expiry_days subtracted two NetClock time points, whose rep is uint32_t, so the subtraction wrapped before the duration_cast ran. A list expired by one day read about +49709 days. The panel is green above 30 while its own description promises red at expiry, so an expired validator list rendered healthy. daysUntil() widens both endpoints to int64_t first, which makes the wrap impossible rather than checked for. It deliberately does not clamp at zero: a negative reading is the signal that expiry has passed. A config-listed list, which uses time_point::max(), now reports positive infinity, because any finite sentinel could not be told apart from the wrap this removes. -1 keeps its existing meaning of no published list fetched. The sweep counter told a second story it could not support. It counted every entry the 1-minute sweep evicted, including acquisitions that had already completed or failed and were merely still in the map. Those were counted when they ended, so the metric buried the wasteful case in ordinary cleanup while the runbook, the reference doc and the panel description all described only the unfinished population. It now counts what those three already claimed. isComplete()/isFailed() are used rather than isDone(), which is protected on TimeoutCounter and not callable here.