diff options
| author | tv <tv@krebsco.de> | 2026-10-25 11:43:53 +0100 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-10-25 11:43:53 +0100 |
| commit | 8886bc09a05b0fb2dc3c84e4b0c816fe81851e14 (patch) | |
| tree | 6eb6b96dddfc4e31f599a0270a050196af1cf50e /src/state.rs | |
| parent | 38f3ef952cf4cdd7cf5e9acbc8d9b64eeca86d81 (diff) | |
add state file
This allows storing the swarm ID and additionally discovered seeds,
which prevents a formerly genesis node to start a new document.
Diffstat (limited to 'src/state.rs')
| -rw-r--r-- | src/state.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/state.rs b/src/state.rs index 785eee8..37bde4a 100644 --- a/src/state.rs +++ b/src/state.rs @@ -602,6 +602,8 @@ pub(crate) struct AppState { /// HTTP API users who may write protocol data through the store API /// (`--protocol-writers`). pub(crate) protocol_writers: Arc<std::collections::HashSet<String>>, + /// What this node remembers across restarts (`--state-file`), if configured. + pub(crate) state_file: Option<Arc<crate::swarm::state_file::StateFile>>, /// The effective configuration with sources, imported values left out /// (`config::Loaded::report`), for `GET /admin/config`. pub(crate) config: Arc<serde_json::Value>, |
