Trait polkadot_service::runtime_traits::BlockIdTo [−][src]
pub trait BlockIdTo<Block> where
Block: Block, {
type Error: Debug;
fn to_hash(
&self,
block_id: &BlockId<Block>
) -> Result<Option<<Block as Block>::Hash>, Self::Error>;
fn to_number(
&self,
block_id: &BlockId<Block>
) -> Result<Option<<<Block as Block>::Header as Header>::Number>, Self::Error>;
}
Expand description
Something that can convert a BlockId
to a number or a hash.
Associated Types
Required methods
Convert the given block_id
to the corresponding block hash.