Trait sp_consensus::import_queue::Verifier [−][src]
pub trait Verifier<B: BlockT>: Send + Sync { fn verify(
&mut self,
origin: BlockOrigin,
header: B::Header,
justification: Option<Justification>,
body: Option<Vec<B::Extrinsic>>
) -> Result<(BlockImportParams<B, ()>, Option<Vec<(CacheKeyId, Vec<u8>)>>), String>; }
Verify a justification of a block
Required methods
fn verify(
&mut self,
origin: BlockOrigin,
header: B::Header,
justification: Option<Justification>,
body: Option<Vec<B::Extrinsic>>
) -> Result<(BlockImportParams<B, ()>, Option<Vec<(CacheKeyId, Vec<u8>)>>), String>
[src][−]
&mut self,
origin: BlockOrigin,
header: B::Header,
justification: Option<Justification>,
body: Option<Vec<B::Extrinsic>>
) -> Result<(BlockImportParams<B, ()>, Option<Vec<(CacheKeyId, Vec<u8>)>>), String>
Verify the given data and return the BlockImportParams and an optional new set of validators to import. If not, err with an Error-Message presented to the User in the logs.
Implementors
impl<B: BlockT, C, P, CAW> Verifier<B> for AuraVerifier<C, P, CAW> where
C: ProvideRuntimeApi<B> + Send + Sync + AuxStore + ProvideCache<B> + BlockOf,
C::Api: BlockBuilderApi<B> + AuraApi<B, <P as Pair>::Public> + ApiExt<B, Error = Error>,
DigestItemFor<B>: CompatibleDigestItem<P>,
P: Pair + Send + Sync + 'static,
P::Public: Send + Sync + Hash + Eq + Clone + Decode + Encode + Debug + 'static,
P::Signature: Encode + Decode,
CAW: CanAuthorWith<B> + Send + Sync + 'static,
impl<B: BlockT, C, P, CAW> Verifier<B> for AuraVerifier<C, P, CAW> where
C: ProvideRuntimeApi<B> + Send + Sync + AuxStore + ProvideCache<B> + BlockOf,
C::Api: BlockBuilderApi<B> + AuraApi<B, <P as Pair>::Public> + ApiExt<B, Error = Error>,
DigestItemFor<B>: CompatibleDigestItem<P>,
P: Pair + Send + Sync + 'static,
P::Public: Send + Sync + Hash + Eq + Clone + Decode + Encode + Debug + 'static,
P::Signature: Encode + Decode,
CAW: CanAuthorWith<B> + Send + Sync + 'static,
impl<Block, Client, SelectChain, CAW> Verifier<Block> for BabeVerifier<Block, Client, SelectChain, CAW> where
Block: BlockT,
Client: HeaderMetadata<Block, Error = Error> + HeaderBackend<Block> + ProvideRuntimeApi<Block> + Send + Sync + AuxStore + ProvideCache<Block>,
Client::Api: BlockBuilderApi<Block, Error = Error> + BabeApi<Block, Error = Error>,
SelectChain: SelectChain<Block>,
CAW: CanAuthorWith<Block> + Send + Sync,
impl<Block, Client, SelectChain, CAW> Verifier<Block> for BabeVerifier<Block, Client, SelectChain, CAW> where
Block: BlockT,
Client: HeaderMetadata<Block, Error = Error> + HeaderBackend<Block> + ProvideRuntimeApi<Block> + Send + Sync + AuxStore + ProvideCache<Block>,
Client::Api: BlockBuilderApi<Block, Error = Error> + BabeApi<Block, Error = Error>,
SelectChain: SelectChain<Block>,
CAW: CanAuthorWith<Block> + Send + Sync,