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 | c54270bdfda6dd3dcc3107693a93bd224bb65c7c (patch) | |
| tree | ac5fa83aa4574f2b5839de22d096f82da530ec71 /src/main.rs | |
| parent | 0f9c74fbde6da95d7ec25d8de4741c45415c2dcc (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, }, )?), |
