From d8880260d8d5002367e86c3aab9fa504e6cec40b Mon Sep 17 00:00:00 2001 From: tv Date: Sat, 21 Nov 2026 21:37:04 +0000 Subject: config: keep-actor on by default, as its help says The help gave keep-actor's default as true, but a node that didn't set it read it as false: an option left unset takes the setting's serde default, not the help's. So a node kept its writer across a clean stop only where keep-actor was set, and options_and_settings_agree failed. --- src/config/mod.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/config') diff --git a/src/config/mod.rs b/src/config/mod.rs index 672b8f8..f9663c1 100644 --- a/src/config/mod.rs +++ b/src/config/mod.rs @@ -913,7 +913,7 @@ pub(crate) struct Settings { pub(crate) genesis: bool, pub(crate) state_file: Option, pub(crate) document_file: Option, - #[serde(default)] + #[serde(default = "default_keep_actor")] pub(crate) keep_actor: bool, #[serde( default = "default_document_append", @@ -1113,6 +1113,9 @@ pub(crate) const TRANSPORTS: &[(&str, bool)] = &[ ("libp2p", cfg!(feature = "libp2p")), ("tor", cfg!(feature = "tor")), ]; +fn default_keep_actor() -> bool { + true +} fn default_log_format() -> String { "auto".to_owned() } -- cgit v1.3.1