From 1cb2ef3f00e695a414de87acfec090dfde749934 Mon Sep 17 00:00:00 2001 From: tv Date: Sat, 31 Oct 2026 06:53:00 +0100 Subject: add peer clock skew warning --- src/state/mod.rs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/state/mod.rs') diff --git a/src/state/mod.rs b/src/state/mod.rs index a2d5d74..cf50b2a 100644 --- a/src/state/mod.rs +++ b/src/state/mod.rs @@ -113,6 +113,11 @@ pub(crate) struct AppState { pub(crate) alias: Option, /// Members alive within this window vote on remakes (`--electorate-window`). pub(crate) electorate_window: Duration, + /// This node's clock is off when it differs from most of its peers' by more than + /// this (`--clock-skew-warn`, `swarm::skew`); 0: never. + pub(crate) clock_skew_warn: Duration, + /// When the log last said this node's clock is off, while it is (`swarm::skew`). + pub(crate) clock_skew_warned: Arc>>, /// Chunked transfers served and fetched (`swarm::blob`). pub(crate) blobs: Arc, /// LINKS asked and answered, for a map of the swarm (`swarm::links`). -- cgit v1.3.1