diff options
| author | tv <tv@krebsco.de> | 2026-11-19 14:29:38 +0000 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-11-19 15:31:22 +0100 |
| commit | a67c96469d2d06e85c4be69a725af7b93fb023a2 (patch) | |
| tree | e1ee54df5f4b0827dce8baf70299f4f305174ae7 /src/config | |
| parent | 5d8259ce576fce47b921c0bfbd6821f255be504a (diff) | |
config: store-propose-versions is 1 unless set, in the settings too
The option's help said 1 unless set, but the setting itself stayed
unset, so a node proposed no checkpoint after a version unless told,
and `options_and_settings_agree` failed: `default of
store-propose-versions`, 1 against null. The setting is a count now,
1 unless set, and 0 has the node propose none after versions.
Diffstat (limited to 'src/config')
| -rw-r--r-- | src/config/mod.rs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/config/mod.rs b/src/config/mod.rs index 652a10e..0ed22a2 100644 --- a/src/config/mod.rs +++ b/src/config/mod.rs @@ -843,7 +843,8 @@ pub(crate) struct Settings { )] pub(crate) store_propose_every: Option<Duration>, #[cfg(feature = "federation")] - pub(crate) store_propose_versions: Option<u64>, + #[serde(default = "default_store_propose_versions")] + pub(crate) store_propose_versions: u64, #[cfg(feature = "federation")] #[serde( default = "default_store_held_for", @@ -1051,6 +1052,10 @@ fn default_session_lifetime() -> Duration { fn default_store_held_for() -> Duration { Duration::from_secs(10 * 60) } +#[cfg(feature = "federation")] +fn default_store_propose_versions() -> u64 { + 1 +} fn default_challenge_lifetime() -> Duration { Duration::from_secs(5 * 60) } |
