diff options
| author | tv <tv@krebsco.de> | 2026-10-31 06:53:00 +0100 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-10-31 06:53:00 +0100 |
| commit | df3f11a337955dd703199cc2b037d4bfb698ceba (patch) | |
| tree | 9077b4bb32b3a492005aad04ddf329a28a39c22d /src/state/mod.rs | |
| parent | 4855ff63536430b1cd26734a0eeeaf0c25df553e (diff) | |
add peer clock skew warning
Diffstat (limited to 'src/state/mod.rs')
| -rw-r--r-- | src/state/mod.rs | 5 |
1 files changed, 5 insertions, 0 deletions
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<String>, /// 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<std::sync::Mutex<Option<tokio::time::Instant>>>, /// Chunked transfers served and fetched (`swarm::blob`). pub(crate) blobs: Arc<crate::swarm::blob::Blobs>, /// LINKS asked and answered, for a map of the swarm (`swarm::links`). |
