Trait sc_client_api::client::BlockBackend[][src]

pub trait BlockBackend<Block: BlockT> {
    fn block_body(
        &self,
        id: &BlockId<Block>
    ) -> Result<Option<Vec<<Block as BlockT>::Extrinsic>>>;
fn block(&self, id: &BlockId<Block>) -> Result<Option<SignedBlock<Block>>>;
fn block_status(&self, id: &BlockId<Block>) -> Result<BlockStatus>;
fn justification(
        &self,
        id: &BlockId<Block>
    ) -> Result<Option<Justification>>;
fn block_hash(
        &self,
        number: NumberFor<Block>
    ) -> Result<Option<Block::Hash>>; }

Interface for fetching block data.

Required methods

fn block_body(
    &self,
    id: &BlockId<Block>
) -> Result<Option<Vec<<Block as BlockT>::Extrinsic>>>
[src]

Get block body by ID. Returns None if the body is not stored.

fn block(&self, id: &BlockId<Block>) -> Result<Option<SignedBlock<Block>>>[src]

Get full block by id.

fn block_status(&self, id: &BlockId<Block>) -> Result<BlockStatus>[src]

Get block status.

fn justification(&self, id: &BlockId<Block>) -> Result<Option<Justification>>[src]

Get block justification set by id.

fn block_hash(&self, number: NumberFor<Block>) -> Result<Option<Block::Hash>>[src]

Get block hash by number.

Loading content...

Implementors

Loading content...