mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-06-28 09:11:34 +00:00
feat: introduce libp2p-allow-block-list
connection management module
Currently, banning peers is a first-class feature of `Swarm`. With the new connection management capabilities of `NetworkBehaviour`, we can now implement allow and block lists as a separate module. We introduce a new crate `libp2p-allow-block-list` and deprecate `Swarm::ban_peer_id` in favor of that. Related #2824. Pull-Request: #3590.
This commit is contained in:
@ -223,7 +223,7 @@ impl<TBvEv, THandleErr> super::Recorder<libp2p_swarm::SwarmEvent<TBvEv, THandleE
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#[allow(deprecated)]
|
||||
libp2p_swarm::DialError::Banned => record(OutgoingConnectionError::Banned),
|
||||
#[allow(deprecated)]
|
||||
libp2p_swarm::DialError::ConnectionLimit(_) => {
|
||||
@ -250,6 +250,7 @@ impl<TBvEv, THandleErr> super::Recorder<libp2p_swarm::SwarmEvent<TBvEv, THandleE
|
||||
}
|
||||
};
|
||||
}
|
||||
#[allow(deprecated)]
|
||||
libp2p_swarm::SwarmEvent::BannedPeer { endpoint, .. } => {
|
||||
self.connected_to_banned_peer
|
||||
.get_or_create(&AddressLabels {
|
||||
|
Reference in New Issue
Block a user