summaryrefslogtreecommitdiffstats
path: root/src/main.rs
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2026-10-25 11:09:32 +0100
committertv <tv@krebsco.de>2026-10-25 11:09:32 +0100
commit65e0069baeb42deb69dd0616e97484bc5a568d7d (patch)
tree30fdb54d9dc98ec724a72407637c4d0548d36f47 /src/main.rs
parent3ecc0fe0bb083e351d769550851d26a9edcb7cf6 (diff)
add genesis flag and never give up
The --genesis flag has been introduced to start with a new document. This prevents restarts to accidentally start with a new document and accept reads/writes, causing a second swarm to appear. Additionally, bootstrapping doesn't timeout anymore as that's of no use for nobody.
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main.rs b/src/main.rs
index 217a9a4..09b365b 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -186,8 +186,9 @@ async fn main() -> Result<()> {
tokio::spawn(remake::run_worker(state.clone()));
trace!("Remake worker task spawned");
+ let joining = bootstrap::bootstrap(&state, &seeds, args.genesis);
tokio::select! {
- joined = bootstrap::bootstrap(&state, &seeds) => joined.context("Joining swarm")?,
+ joined = joining => joined.context("Joining swarm")?,
_ = stopped(stop.clone()) => {
info!("Stopped while joining the swarm");
return Ok(());