Remove DiscoveryNetBehaviour trait (#5430)

This commit is contained in:
Pierre Krieger
2020-04-01 17:25:53 +02:00
committed by GitHub
parent 72239adda1
commit 84ff6ef157
4 changed files with 20 additions and 29 deletions
-11
View File
@@ -255,14 +255,3 @@ pub use libp2p::{Multiaddr, PeerId};
pub use libp2p::multiaddr;
pub use sc_peerset::ReputationChange;
/// Extension trait for `NetworkBehaviour` that also accepts discovering nodes.
trait DiscoveryNetBehaviour {
/// Notify the protocol that we have learned about the existence of nodes.
///
/// Can (or most likely will) be called multiple times with the same `PeerId`s.
///
/// Also note that there is no notification for expired nodes. The implementer must add a TTL
/// system, or remove nodes that will fail to reach.
fn add_discovered_nodes(&mut self, nodes: impl Iterator<Item = PeerId>);
}