mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-06-13 01:51:23 +00:00
protocols/mdns: Update to if-watch v2.0.0 (#2978)
This commit is contained in:
@ -61,7 +61,7 @@ async fn create_swarm(config: MdnsConfig) -> Result<Swarm<Mdns>, Box<dyn Error>>
|
||||
let id_keys = identity::Keypair::generate_ed25519();
|
||||
let peer_id = PeerId::from(id_keys.public());
|
||||
let transport = libp2p::development_transport(id_keys).await?;
|
||||
let behaviour = Mdns::new(config).await?;
|
||||
let behaviour = Mdns::new(config)?;
|
||||
let mut swarm = Swarm::new(transport, behaviour, peer_id);
|
||||
swarm.listen_on("/ip4/0.0.0.0/tcp/0".parse()?)?;
|
||||
Ok(swarm)
|
||||
|
Reference in New Issue
Block a user