reth_network_p2p::bodies::downloader

Trait BodyDownloader

Source
pub trait BodyDownloader:
    Send
    + Sync
    + Stream<Item = BodyDownloaderResult<Self::Body>>
    + Unpin {
    type Body: Send + Sync + Unpin + 'static;

    // Required method
    fn set_download_range(
        &mut self,
        range: RangeInclusive<BlockNumber>,
    ) -> DownloadResult<()>;
}
Expand description

A downloader capable of fetching and yielding block bodies from block headers.

A downloader represents a distinct strategy for submitting requests to download block bodies, while a BodiesClient represents a client capable of fulfilling these requests.

Required Associated Types§

Source

type Body: Send + Sync + Unpin + 'static

The type of the body that is being downloaded.

Required Methods§

Source

fn set_download_range( &mut self, range: RangeInclusive<BlockNumber>, ) -> DownloadResult<()>

Method for setting the download range.

Implementors§