summaryrefslogtreecommitdiffstats
path: root/src/swarm/bootstrap.rs
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2026-10-27 03:44:03 +0100
committertv <tv@krebsco.de>2026-10-27 03:44:03 +0100
commitc64a96723ec068fa7a9a7b60e6f7edd0f2f8603b (patch)
tree6fcf2f9c8f57c071262a62b12f8baaef20801af7 /src/swarm/bootstrap.rs
parent16942f707da89e4ce7ce178d116142a17911a614 (diff)
use libp2p mDNS
Diffstat (limited to 'src/swarm/bootstrap.rs')
-rw-r--r--src/swarm/bootstrap.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/swarm/bootstrap.rs b/src/swarm/bootstrap.rs
index ad1de61..7c4c444 100644
--- a/src/swarm/bootstrap.rs
+++ b/src/swarm/bootstrap.rs
@@ -124,6 +124,17 @@ pub(crate) async fn bootstrap(state: &AppState, seeds: &[String], start: Start)
}
let now = Instant::now();
+ // Nodes the transport found by itself (libp2p on the LAN): seeds too.
+ let found = state.transport.discovered_seeds();
+ if !found.is_empty() {
+ for seed in found {
+ if !unresolved.contains(&seed) {
+ info!(seed = %seed, "Found a node nearby; joining through it");
+ unresolved.push(seed);
+ }
+ }
+ next_resolve = now;
+ }
if !unresolved.is_empty() && now >= next_resolve {
resolve_seeds(state, &mut unresolved, &mut failing).await;
if !unresolved.is_empty() {