aboutsummaryrefslogtreecommitdiffstats
path: root/src/node.rs
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2026-11-07 22:35:09 +0100
committertv <tv@krebsco.de>2026-11-07 22:35:09 +0100
commita8ee17b7513c0367b5a9e5a30ae290fe53dad88b (patch)
treef565f2271818a0b3ff86645f6bcf9039a468833a /src/node.rs
parent7dbb95d6c1dd7245e50d3aaadd26ee24f3506ba1 (diff)
access: first users at genesis
--bootstrap-users gives a new swarm a registry from its first change, each first user with everything; other users may do nothing until added. Without it the swarm has no registry and works as before. Auth plan M1.
Diffstat (limited to 'src/node.rs')
-rw-r--r--src/node.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/node.rs b/src/node.rs
index 28ce095..c172fb8 100644
--- a/src/node.rs
+++ b/src/node.rs
@@ -60,6 +60,10 @@ pub(crate) struct NodeConfig {
pub(crate) blob_chunk_bytes: u32,
pub(crate) swarm_key: Option<Arc<SwarmKey>>,
pub(crate) protocol_writers: HashSet<String>,
+ /// On a genesis node: the swarm's first users, which it records
+ /// (`access::registry::first_users`); empty elsewhere, and where none were named
+ /// (the simulations: no registry, as in a swarm from before).
+ pub(crate) first_users: crate::access::registry::FirstUsers,
pub(crate) files: Arc<Files>,
pub(crate) state_file: Option<Arc<StateFile>>,
pub(crate) document_file: Option<Arc<DocumentFile>>,
@@ -139,6 +143,7 @@ impl Node {
blobs: Arc::new(swarm::blob::Blobs::new(config.blob_chunk_bytes)),
links: Default::default(),
protocol_writers: Arc::new(config.protocol_writers),
+ first_users: Arc::new(config.first_users),
state_file: config.state_file,
document_file: config.document_file,
files: config.files,