diff options
| author | tv <tv@krebsco.de> | 2026-10-27 03:11:44 +0100 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-10-27 03:11:44 +0100 |
| commit | 3455b1ddb2f2ea95a1fb770882b5230d45a7d3de (patch) | |
| tree | b96f0af83e5edae5e007db2ff4d6b3f76a7e8ee1 /src/main.rs | |
| parent | 3ea038aacb0f63d5812dcf062fc326a80eead79d (diff) | |
use libp2p identify protocol & announce alt addrs
Diffstat (limited to 'src/main.rs')
| -rw-r--r-- | src/main.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/main.rs b/src/main.rs index 3ab51d3..6168bc9 100644 --- a/src/main.rs +++ b/src/main.rs @@ -187,6 +187,15 @@ async fn main() -> Result<()> { .with_context(|| format!("libp2p-listen {address:?}")) }) .collect::<Result<Vec<_>>>()?; + let announce = args + .libp2p_announce + .iter() + .map(|address| { + address + .parse::<libp2p::Multiaddr>() + .with_context(|| format!("libp2p-announce {address:?}")) + }) + .collect::<Result<Vec<_>>>()?; let key = transport::p2p::Libp2pConfig::load_key(args.libp2p_key_file.as_deref())?; ( "libp2p", @@ -194,6 +203,7 @@ async fn main() -> Result<()> { transport::p2p::Libp2pConfig { key, listen, + announce, memory: false, }, )?), |
