Trait polkadot_service::HeaderProvider [−][src]
pub trait HeaderProvider<Block, Error = Error>: Send + Sync + 'static where
Block: BlockT,
Error: Debug + Send + Sync + 'static, {
fn header(
&self,
hash: <Block as BlockT>::Hash
) -> Result<Option<<Block as BlockT>::Header>, Error>;
fn number(
&self,
hash: <Block as BlockT>::Hash
) -> Result<Option<<<Block as BlockT>::Header as HeaderT>::Number>, Error>;
}
Expand description
Provides the header and block number for a hash.
Decouples sc_client_api::Backend
and sp_blockchain::HeaderBackend
.
Required methods
Obtain the header for a hash.