mirror of
https://github.com/XRPLF/rippled.git
synced 2026-09-28 15:58:07 +00:00
updateStallState() is wholly telemetry: it applies evaluateStall(), stores the result in currentStallSeconds_ and bumps stallEventCount_. Those two members have exactly one reader each, MetricsRegistry.cpp:1986 and :2023, both inside the registry's own XRPL_ENABLE_TELEMETRY region, reached through getCurrentStallSeconds() and getStallEventCount(), which nothing else calls. The monitor thread ran it once per second for the life of the process. Guard the body, not the members or the accessors: a member set that differs between build configurations is the hazard that once made a test mock abstract. evaluateStall() stays where it is, being a public constexpr rule with its own GTest coverage in SyncStateSignals.cpp. The atomic header moves behind the same guard, as the relaxed memory orders are named only in the guarded body; LoadManager.h includes it for the members.