Trait vapcore_light::client::fetch::ChainDataFetcher[][src]

pub trait ChainDataFetcher: Send + Sync + 'static {
    type Error: Debug;
    type Body: IntoFuture<Item = Block, Error = Self::Error>;
    type Receipts: IntoFuture<Item = Vec<Receipt>, Error = Self::Error>;
    type Transition: IntoFuture<Item = Vec<u8>, Error = Self::Error>;
    fn block_body(&self, header: &Header) -> Self::Body;
fn block_receipts(&self, header: &Header) -> Self::Receipts;
fn epoch_transition(
        &self,
        _hash: H256,
        _engine: Arc<dyn Engine>,
        _checker: Arc<dyn StateDependentProof>
    ) -> Self::Transition; }

Provides full chain data.

Associated Types

type Error: Debug[src]

Error type when data unavailable.

type Body: IntoFuture<Item = Block, Error = Self::Error>[src]

Future for fetching block body.

type Receipts: IntoFuture<Item = Vec<Receipt>, Error = Self::Error>[src]

Future for fetching block receipts.

type Transition: IntoFuture<Item = Vec<u8>, Error = Self::Error>[src]

Future for fetching epoch transition

Loading content...

Required methods

fn block_body(&self, header: &Header) -> Self::Body[src]

Fetch a block body.

fn block_receipts(&self, header: &Header) -> Self::Receipts[src]

Fetch block receipts.

fn epoch_transition(
    &self,
    _hash: H256,
    _engine: Arc<dyn Engine>,
    _checker: Arc<dyn StateDependentProof>
) -> Self::Transition
[src]

Fetch epoch transition proof at given header.

Loading content...

Implementors

impl ChainDataFetcher for Unavailable[src]

type Error = &'static str

type Body = Result<Block, &'static str>

type Receipts = Result<Vec<Receipt>, &'static str>

type Transition = Result<Vec<u8>, &'static str>

Loading content...