aboutsummaryrefslogtreecommitdiffstats
path: root/src/node.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/node.rs')
-rw-r--r--src/node.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/node.rs b/src/node.rs
index f722112..4e19da5 100644
--- a/src/node.rs
+++ b/src/node.rs
@@ -89,6 +89,9 @@ pub(crate) struct NodeConfig {
/// `--store-id`).
#[cfg(feature = "federation")]
pub(crate) store: Option<crate::federation::store::Id>,
+ /// The store it holds, and the file it keeps its own of it in (`--store-file`).
+ #[cfg(feature = "federation")]
+ pub(crate) holding: crate::federation::held::Holding,
/// `--strict-keys`.
pub(crate) strict_keys: Vec<crate::access::sshsig::PublicKey>,
/// `--cors-origins`.
@@ -206,6 +209,8 @@ impl Node {
)),
roots: Default::default(),
genesis_root: config.genesis_root,
+ #[cfg(feature = "federation")]
+ holding: Arc::new(config.holding),
challenges: Default::default(),
ended_sessions: Default::default(),
session_ended: Default::default(),
@@ -296,6 +301,12 @@ impl Node {
tokio::spawn(swarm::topology::run_worker(state.clone()));
trace!("Topology worker task spawned");
+ #[cfg(feature = "federation")]
+ {
+ tokio::spawn(crate::federation::held::run_worker(state.clone()));
+ trace!("Store worker task spawned");
+ }
+
state
}
}