mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-07-02 19:21:37 +00:00
Store information about the local node in the topology (#772)
* Store information about the local node in the topology * Fix build * Store the external addresses in the topology
This commit is contained in:
@ -22,7 +22,7 @@ use crate::service::{MdnsService, MdnsPacket};
|
||||
use futures::prelude::*;
|
||||
use libp2p_core::protocols_handler::{DummyProtocolsHandler, ProtocolsHandler};
|
||||
use libp2p_core::swarm::{ConnectedPoint, NetworkBehaviour, NetworkBehaviourAction, PollParameters};
|
||||
use libp2p_core::{Multiaddr, PeerId, multiaddr::Protocol, topology::MemoryTopology};
|
||||
use libp2p_core::{Multiaddr, PeerId, multiaddr::Protocol, topology::MemoryTopology, topology::Topology};
|
||||
use smallvec::SmallVec;
|
||||
use std::{fmt, io, iter, marker::PhantomData, time::Duration};
|
||||
use tokio_io::{AsyncRead, AsyncWrite};
|
||||
@ -55,7 +55,7 @@ impl<TSubstream> Mdns<TSubstream> {
|
||||
}
|
||||
|
||||
/// Trait that must be implemented on the network topology for it to be usable with `Mdns`.
|
||||
pub trait MdnsTopology {
|
||||
pub trait MdnsTopology: Topology {
|
||||
/// Adds an address discovered by mDNS.
|
||||
///
|
||||
/// Will never be called with the local peer ID.
|
||||
|
Reference in New Issue
Block a user