pub trait JustificationImport<B: BlockT> {
type Error: Error + Send + 'static;
// Required methods
fn on_start<'life0, 'async_trait>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Vec<(B::Hash, NumberFor<B>)>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn import_justification<'life0, 'async_trait>(
&'life0 mut self,
hash: B::Hash,
number: NumberFor<B>,
justification: Justification
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}
Expand description
Justification import trait
Required Associated Types§
Required Methods§
sourcefn on_start<'life0, 'async_trait>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Vec<(B::Hash, NumberFor<B>)>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn on_start<'life0, 'async_trait>( &'life0 mut self ) -> Pin<Box<dyn Future<Output = Vec<(B::Hash, NumberFor<B>)>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
Called by the import queue when it is started. Returns a list of justifications to request from the network.
sourcefn import_justification<'life0, 'async_trait>(
&'life0 mut self,
hash: B::Hash,
number: NumberFor<B>,
justification: Justification
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn import_justification<'life0, 'async_trait>( &'life0 mut self, hash: B::Hash, number: NumberFor<B>, justification: Justification ) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
Import a Block justification and finalize the given block.