diff options
Diffstat (limited to 'src/config')
| -rw-r--r-- | src/config/mod.rs | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/config/mod.rs b/src/config/mod.rs index 73f4432..b4ea0aa 100644 --- a/src/config/mod.rs +++ b/src/config/mod.rs @@ -107,7 +107,14 @@ pub(crate) const OPTIONS: &[OptionSpec] = &[ Kind::Flag, "BOOL", Some("false"), - "Start a new swarm, as its genesis node, instead of joining one through seeds. Every start with it starts another new swarm: drop it once the swarm exists, and give the node seeds instead.", + "Start a new swarm, as its genesis node, instead of joining one through seeds. Every start with it starts another new swarm: drop it once the swarm exists, and give the node seeds instead. With a --state-file that remembers a swarm, it starts that swarm again instead (empty; nodes of it still running merge with this one).", + ), + option( + "state-file", + Kind::Text, + "PATH", + None, + "File where this node remembers its swarm across restarts: the swarm ID and some members to rejoin through (not the document). Written once ready, then rarely. Without it, a restarted node knows only its configured seeds.", ), option( "swarm-key-file", @@ -222,6 +229,7 @@ pub(crate) struct Settings { pub(crate) seeds: Vec<String>, #[serde(default)] pub(crate) genesis: bool, + pub(crate) state_file: Option<PathBuf>, pub(crate) swarm_key_file: Option<PathBuf>, pub(crate) alias: Option<String>, #[serde(default = "default_keepalive_secs")] |
