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