reth_network_p2p/headers/
error.rs1use derive_more::{Display, Error};
2use reth_consensus::ConsensusError;
3use reth_primitives::SealedHeader;
4
5pub type HeadersDownloaderResult<T, H> = Result<T, HeadersDownloaderError<H>>;
7
8#[derive(Debug, Clone, Eq, PartialEq, Display, Error)]
10pub enum HeadersDownloaderError<H> {
11 #[display("valid downloaded header cannot be attached to the local head: {error}")]
14 DetachedHead {
15 local_head: Box<SealedHeader<H>>,
17 header: Box<SealedHeader<H>>,
19 #[error(source)]
21 error: Box<ConsensusError>,
22 },
23}