Trait sc_consensus_manual_seal::consensus::ConsensusDataProvider [−][src]
pub trait ConsensusDataProvider<B: BlockT>: Send + Sync { type Transaction; fn create_digest(
&self,
parent: &B::Header,
inherents: &InherentData
) -> Result<DigestFor<B>, Error>; fn append_block_import(
&self,
parent: &B::Header,
params: &mut BlockImportParams<B, Self::Transaction>,
inherents: &InherentData
) -> Result<(), Error>; }
Expand description
Consensus data provider, manual seal uses this trait object for authoring blocks valid for any runtime.
Associated Types
type Transaction
type Transaction
Block import transaction type
Required methods
fn create_digest(
&self,
parent: &B::Header,
inherents: &InherentData
) -> Result<DigestFor<B>, Error>
fn create_digest(
&self,
parent: &B::Header,
inherents: &InherentData
) -> Result<DigestFor<B>, Error>
Attempt to create a consensus digest.
fn append_block_import(
&self,
parent: &B::Header,
params: &mut BlockImportParams<B, Self::Transaction>,
inherents: &InherentData
) -> Result<(), Error>
fn append_block_import(
&self,
parent: &B::Header,
params: &mut BlockImportParams<B, Self::Transaction>,
inherents: &InherentData
) -> Result<(), Error>
set up the neccessary import params.
Implementors
impl<B, C> ConsensusDataProvider<B> for BabeConsensusDataProvider<B, C> where
B: BlockT,
C: AuxStore + HeaderBackend<B> + HeaderMetadata<B, Error = Error> + UsageProvider<B> + ProvideRuntimeApi<B>,
C::Api: BabeApi<B>,