pub trait DeriveConsensusParametersChainInfo: Send + Sync {
// Required method
fn ancestor_header_consensus_info(
&self,
ancestor_block_number: BlockNumber,
descendant_block_root: &BlockRoot,
) -> Option<DeriveConsensusParametersConsensusInfo>;
}Expand description
Chain info for derive_consensus_parameters().
Must have access to enough parent blocks.
Required Methods§
Sourcefn ancestor_header_consensus_info(
&self,
ancestor_block_number: BlockNumber,
descendant_block_root: &BlockRoot,
) -> Option<DeriveConsensusParametersConsensusInfo>
fn ancestor_header_consensus_info( &self, ancestor_block_number: BlockNumber, descendant_block_root: &BlockRoot, ) -> Option<DeriveConsensusParametersConsensusInfo>
Get consensus info of the block at ancestor_block_number on the chain ending at
descendant_block_root.
If ancestor_block_number is the descendant’s own number, the descendant’s consensus info
is returned. Returns None if ancestor_block_number is higher than the descendant’s
number or if either block is not available.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".