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 | d14ce65a9f30f31836a737a466c6086bda4ccbae (patch) | |
| tree | 8bcaf76599805d06980f5cf773b6a75326a963be /src/state | |
| parent | 7feea90e195cec3e99d294fa518f9a9e4ebeebcb (diff) | |
add peer clock skew warning
Diffstat (limited to 'src/state')
| -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`). |
