1//! Errors interfacing with [`discv5::Discv5`].
23/// Errors interfacing with [`discv5::Discv5`].
4#[derive(thiserror::Error, Debug)]
5pub enum Error {
6/// Failure adding node to [`discv5::Discv5`].
7#[error("failed adding node to discv5, {0}")]
8AddNodeFailed(&'static str),
9/// Node record has incompatible key type.
10#[error("incompatible key type (not secp256k1)")]
11IncompatibleKeyType,
12/// No key used to identify rlpx network is configured.
13#[error("network stack identifier is not configured")]
14NetworkStackIdNotConfigured,
15/// Missing key used to identify rlpx network.
16#[error("fork missing on enr, key missing")]
17ForkMissing(&'static [u8]),
18/// Failed to decode [`ForkId`](reth_ethereum_forks::ForkId) rlp value.
19#[error("failed to decode fork id, 'eth': {0:?}")]
20ForkIdDecodeError(#[from] alloy_rlp::Error),
21/// Peer is unreachable over discovery.
22#[error("discovery socket missing")]
23UnreachableDiscovery,
24/// Failed to initialize [`discv5::Discv5`].
25#[error("init failed, {0}")]
26InitFailure(&'static str),
27/// An error from underlying [`discv5::Discv5`] node.
28#[error("sigp/discv5 error, {0}")]
29Discv5Error(discv5::Error),
30/// The [`ListenConfig`](discv5::ListenConfig) has been misconfigured.
31#[error("misconfigured listen config, RLPx TCP address must also be supported by discv5")]
32ListenConfigMisconfigured,
33}