reth_network_p2p/headers/
error.rsuse derive_more::{Display, Error};
use reth_consensus::ConsensusError;
use reth_primitives::SealedHeader;
pub type HeadersDownloaderResult<T> = Result<T, HeadersDownloaderError>;
#[derive(Debug, Clone, Eq, PartialEq, Display, Error)]
pub enum HeadersDownloaderError {
#[display("valid downloaded header cannot be attached to the local head: {error}")]
DetachedHead {
local_head: Box<SealedHeader>,
header: Box<SealedHeader>,
#[error(source)]
error: Box<ConsensusError>,
},
}