diff options
Diffstat (limited to 'src/config/mod.rs')
| -rw-r--r-- | src/config/mod.rs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/config/mod.rs b/src/config/mod.rs index 37c3ce6..2dfefcf 100644 --- a/src/config/mod.rs +++ b/src/config/mod.rs @@ -250,6 +250,13 @@ pub(crate) const OPTIONS: &[OptionSpec] = &[ "Members that renewed their alive stamp within this time vote on remakes (a majority of them must agree). Matters on the node that coordinates a remake.", ), option( + "clock-skew-warn", + Kind::Duration, + "DURATION", + Some("2s"), + "Warn in the log when this node's clock differs from most of its peers' by more than this, for sure (beyond half the round trip it was measured over, from their PONGs); 0: never.", + ), + option( "blob-chunk", Kind::Size, "SIZE", @@ -467,6 +474,11 @@ pub(crate) struct Settings { with = "crate::units::duration_option" )] pub(crate) electorate_window: Duration, + #[serde( + default = "default_clock_skew_warn", + with = "crate::units::duration_option" + )] + pub(crate) clock_skew_warn: Duration, /// In bytes. #[serde(default = "default_blob_chunk", with = "crate::units::size_option")] pub(crate) blob_chunk: u64, @@ -539,6 +551,9 @@ fn default_neighbours() -> usize { fn default_electorate_window() -> Duration { Duration::from_secs(7 * 24 * 3600) } +fn default_clock_skew_warn() -> Duration { + Duration::from_secs(2) +} fn default_blob_chunk() -> u64 { 64 * 1024 } |
