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§
Required Methods§
sourcefn create_digest(
&self,
parent: &B::Header,
inherents: &InherentData,
) -> Result<Digest, Error>
fn create_digest( &self, parent: &B::Header, inherents: &InherentData, ) -> Result<Digest, Error>
Attempt to create a consensus digest.