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:
Thomas Eizinger
2023-03-21 21:58:09 +01:00
committed by GitHub
parent 3fa10be0d5
commit f64187049d
12 changed files with 532 additions and 2 deletions

View File

@@ -1923,6 +1923,7 @@ where
};
match error {
#[allow(deprecated)]
DialError::Banned
| DialError::LocalPeerId { .. }
| DialError::InvalidPeerId { .. }