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>>;
fn extrinsic(
        &self,
        hash: &Block::Hash
    ) -> Result<Option<<Block as BlockT>::Extrinsic>>; fn have_extrinsic(&self, hash: &Block::Hash) -> Result<bool> { ... } }
Expand description

Interface for fetching block data.

Required methods

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

Get full block by id.

Get block status.

Get block justification set by id.

Get block hash by number.

Get single extrinsic by hash.

Provided methods

Check if extrinsic exists.

Implementors