pub trait BlockBackend<Block: BlockT> {
    fn block_body(
        &self,
        id: &BlockId<Block>
    ) -> Result<Option<Vec<<Block as BlockT>::Extrinsic>>>; fn block_indexed_body(
        &self,
        id: &BlockId<Block>
    ) -> Result<Option<Vec<Vec<u8>>>>; fn block(&self, id: &BlockId<Block>) -> Result<Option<SignedBlock<Block>>>; fn block_status(&self, id: &BlockId<Block>) -> Result<BlockStatus>; fn justifications(
        &self,
        id: &BlockId<Block>
    ) -> Result<Option<Justifications>>; fn block_hash(&self, number: NumberFor<Block>) -> Result<Option<Block::Hash>>; fn indexed_transaction(&self, hash: &Block::Hash) -> Result<Option<Vec<u8>>>; fn requires_full_sync(&self) -> bool; fn has_indexed_transaction(&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 all indexed transactions for a block, including renewed transactions.

Note that this will only fetch transactions that are indexed by the runtime with storage_index_transaction.

Get full block by id.

Get block status.

Get block justifications for the block with the given id.

Get block hash by number.

Get single indexed transaction by content hash.

Note that this will only fetch transactions that are indexed by the runtime with storage_index_transaction.

Tells whether the current client configuration requires full-sync mode.

Provided Methods

Check if transaction index exists.

Implementors