#![cfg(feature = "full")]
use libp2p::{Multiaddr, PeerId};
#[derive(Clone, Debug, thiserror::Error)]
pub enum Error {
#[error("Already added that address: {0}")]
AddressIsDuplicate(Multiaddr),
#[error("Already banned that address: {0}")]
AddressIsBanned(Multiaddr),
#[error("Address is one of the local bind addresses: {0}")]
AddressIsLocal(Multiaddr),
#[error("Already unbanned that address: {0}")]
AddressIsUnbanned(Multiaddr),
#[error("Peer matches the local Id: {0}")]
PeerIsLocal(PeerId),
#[error("Not present peer: {0}")]
PeerNotPresent(PeerId),
#[error("Already added that peer: {0}")]
PeerIsDuplicate(PeerId),
#[error("Already banned that peer: {0}")]
PeerIsBanned(PeerId),
#[error("Already connected that peer: {0}")]
PeerIsConnected(PeerId),
#[error("Already disconnected that peer: {0}")]
PeerIsDisconnected(PeerId),
#[error("Already unbanned that peer: {0}")]
PeerIsUnbanned(PeerId),
#[error("Tried to add more unknown peers than defined in the config ({0}).")]
ExceedsUnknownPeerLimit(usize),
}