referrerpolicy=no-referrer-when-downgrade
pub trait ConsensusDataProvider<B: BlockT>: Send + Sync {
    type Proof;

    // Required methods
    fn create_digest(
        &self,
        parent: &B::Header,
        inherents: &InherentData,
    ) -> Result<Digest, Error>;
    fn append_block_import(
        &self,
        parent: &B::Header,
        params: &mut BlockImportParams<B>,
        inherents: &InherentData,
        proof: Self::Proof,
    ) -> Result<(), Error>;
}
Expand description

Consensus data provider, manual seal uses this trait object for authoring blocks valid for any runtime.

Required Associated Types§

source

type Proof

The proof type.

Required Methods§

source

fn create_digest( &self, parent: &B::Header, inherents: &InherentData, ) -> Result<Digest, Error>

Attempt to create a consensus digest.

source

fn append_block_import( &self, parent: &B::Header, params: &mut BlockImportParams<B>, inherents: &InherentData, proof: Self::Proof, ) -> Result<(), Error>

Set up the necessary import params.

Implementors§

source§

impl<B, C, P> ConsensusDataProvider<B> for AuraConsensusDataProvider<B, C, P>
where B: BlockT, C: AuxStore + HeaderBackend<B> + HeaderMetadata<B, Error = Error> + UsageProvider<B> + ProvideRuntimeApi<B>, C::Api: AuraApi<B, AuthorityId>, P: Send + Sync,

§

type Proof = P

source§

impl<B, C, P> ConsensusDataProvider<B> for BabeConsensusDataProvider<B, C, P>
where B: BlockT, C: AuxStore + HeaderBackend<B> + HeaderMetadata<B, Error = Error> + UsageProvider<B> + ProvideRuntimeApi<B>, C::Api: BabeApi<B>, P: Send + Sync,

§

type Proof = P