mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-06-12 01:21:21 +00:00
swarm/: Provide additional default impls on NetworkBehaviour
(#2150)
Not all implementations of `NetworkBehaviour` need all callbacks. We've have been adding new callbacks with default implementations for a while now. There is no reason the initial ones cannot also be defaulted, thus making it easier create new implementations. Co-authored-by: Max Inden <mail@max-inden.de>
This commit is contained in:
@ -2804,10 +2804,6 @@ where
|
||||
)
|
||||
}
|
||||
|
||||
fn addresses_of_peer(&mut self, _: &PeerId) -> Vec<Multiaddr> {
|
||||
Vec::new()
|
||||
}
|
||||
|
||||
fn inject_connected(&mut self, peer_id: &PeerId) {
|
||||
// Ignore connections from blacklisted peers.
|
||||
if self.blacklisted_peers.contains(peer_id) {
|
||||
|
Reference in New Issue
Block a user