Trait polkadot_service::BlockImport
source · pub trait BlockImport<B>where
B: Block,{
type Error: Error + Send + 'static;
// Required methods
fn check_block<'life0, 'async_trait>(
&'life0 mut self,
block: BlockCheckParams<B>
) -> Pin<Box<dyn Future<Output = Result<ImportResult, Self::Error>> + Send + 'async_trait, Global>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn import_block<'life0, 'async_trait>(
&'life0 mut self,
block: BlockImportParams<B>
) -> Pin<Box<dyn Future<Output = Result<ImportResult, Self::Error>> + Send + 'async_trait, Global>>
where 'life0: 'async_trait,
Self: 'async_trait;
}
Expand description
Block import trait.
Required Associated Types§
Required Methods§
sourcefn check_block<'life0, 'async_trait>(
&'life0 mut self,
block: BlockCheckParams<B>
) -> Pin<Box<dyn Future<Output = Result<ImportResult, Self::Error>> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
Self: 'async_trait,
fn check_block<'life0, 'async_trait>( &'life0 mut self, block: BlockCheckParams<B> ) -> Pin<Box<dyn Future<Output = Result<ImportResult, Self::Error>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, Self: 'async_trait,
Check block preconditions.
sourcefn import_block<'life0, 'async_trait>(
&'life0 mut self,
block: BlockImportParams<B>
) -> Pin<Box<dyn Future<Output = Result<ImportResult, Self::Error>> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
Self: 'async_trait,
fn import_block<'life0, 'async_trait>( &'life0 mut self, block: BlockImportParams<B> ) -> Pin<Box<dyn Future<Output = Result<ImportResult, Self::Error>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, Self: 'async_trait,
Import a block.
Trait Implementations§
source§impl<B> BlockImport<B> for Box<dyn BlockImport<B, Error = Error> + Sync + Send + 'static, Global>where
B: Block,
impl<B> BlockImport<B> for Box<dyn BlockImport<B, Error = Error> + Sync + Send + 'static, Global>where B: Block,
source§fn check_block<'life0, 'async_trait>(
&'life0 mut self,
block: BlockCheckParams<B>
) -> Pin<Box<dyn Future<Output = Result<ImportResult, <Box<dyn BlockImport<B, Error = Error> + Sync + Send + 'static, Global> as BlockImport<B>>::Error>> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
Box<dyn BlockImport<B, Error = Error> + Sync + Send + 'static, Global>: 'async_trait,
fn check_block<'life0, 'async_trait>( &'life0 mut self, block: BlockCheckParams<B> ) -> Pin<Box<dyn Future<Output = Result<ImportResult, <Box<dyn BlockImport<B, Error = Error> + Sync + Send + 'static, Global> as BlockImport<B>>::Error>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, Box<dyn BlockImport<B, Error = Error> + Sync + Send + 'static, Global>: 'async_trait,
Check block preconditions.
source§fn import_block<'life0, 'async_trait>(
&'life0 mut self,
block: BlockImportParams<B>
) -> Pin<Box<dyn Future<Output = Result<ImportResult, <Box<dyn BlockImport<B, Error = Error> + Sync + Send + 'static, Global> as BlockImport<B>>::Error>> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
Box<dyn BlockImport<B, Error = Error> + Sync + Send + 'static, Global>: 'async_trait,
fn import_block<'life0, 'async_trait>( &'life0 mut self, block: BlockImportParams<B> ) -> Pin<Box<dyn Future<Output = Result<ImportResult, <Box<dyn BlockImport<B, Error = Error> + Sync + Send + 'static, Global> as BlockImport<B>>::Error>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, Box<dyn BlockImport<B, Error = Error> + Sync + Send + 'static, Global>: 'async_trait,
Import a block.
Implementations on Foreign Types§
source§impl<BE, Block, Client, SC> BlockImport<Block> for GrandpaBlockImport<BE, Block, Client, SC>where
Block: Block,
<<Block as Block>::Header as Header>::Number: BlockNumberOps,
BE: Backend<Block>,
Client: ClientForGrandpa<Block, BE>,
<Client as ProvideRuntimeApi<Block>>::Api: GrandpaApi<Block>,
&'a Client: for<'a> BlockImport<Block, Error = Error>,
SC: Send,
impl<BE, Block, Client, SC> BlockImport<Block> for GrandpaBlockImport<BE, Block, Client, SC>where Block: Block, <<Block as Block>::Header as Header>::Number: BlockNumberOps, BE: Backend<Block>, Client: ClientForGrandpa<Block, BE>, <Client as ProvideRuntimeApi<Block>>::Api: GrandpaApi<Block>, &'a Client: for<'a> BlockImport<Block, Error = Error>, SC: Send,
type Error = Error
fn import_block<'life0, 'async_trait>( &'life0 mut self, block: BlockImportParams<Block> ) -> Pin<Box<dyn Future<Output = Result<ImportResult, <GrandpaBlockImport<BE, Block, Client, SC> as BlockImport<Block>>::Error>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, GrandpaBlockImport<BE, Block, Client, SC>: 'async_trait,
fn check_block<'life0, 'async_trait>( &'life0 mut self, block: BlockCheckParams<Block> ) -> Pin<Box<dyn Future<Output = Result<ImportResult, <GrandpaBlockImport<BE, Block, Client, SC> as BlockImport<Block>>::Error>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, GrandpaBlockImport<BE, Block, Client, SC>: 'async_trait,
source§impl<B, T, E> BlockImport<B> for Arc<T>where
B: Block,
E: Error + Send + 'static,
&'r T: for<'r> BlockImport<B, Error = E>,
T: Send + Sync,
impl<B, T, E> BlockImport<B> for Arc<T>where B: Block, E: Error + Send + 'static, &'r T: for<'r> BlockImport<B, Error = E>, T: Send + Sync,
type Error = E
fn check_block<'life0, 'async_trait>( &'life0 mut self, block: BlockCheckParams<B> ) -> Pin<Box<dyn Future<Output = Result<ImportResult, <Arc<T> as BlockImport<B>>::Error>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, Arc<T>: 'async_trait,
fn import_block<'life0, 'async_trait>( &'life0 mut self, block: BlockImportParams<B> ) -> Pin<Box<dyn Future<Output = Result<ImportResult, <Arc<T> as BlockImport<B>>::Error>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, Arc<T>: 'async_trait,
source§impl<B> BlockImport<B> for Box<dyn BlockImport<B, Error = Error> + Sync + Send + 'static, Global>where
B: Block,
impl<B> BlockImport<B> for Box<dyn BlockImport<B, Error = Error> + Sync + Send + 'static, Global>where B: Block,
source§fn check_block<'life0, 'async_trait>(
&'life0 mut self,
block: BlockCheckParams<B>
) -> Pin<Box<dyn Future<Output = Result<ImportResult, <Box<dyn BlockImport<B, Error = Error> + Sync + Send + 'static, Global> as BlockImport<B>>::Error>> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
Box<dyn BlockImport<B, Error = Error> + Sync + Send + 'static, Global>: 'async_trait,
fn check_block<'life0, 'async_trait>( &'life0 mut self, block: BlockCheckParams<B> ) -> Pin<Box<dyn Future<Output = Result<ImportResult, <Box<dyn BlockImport<B, Error = Error> + Sync + Send + 'static, Global> as BlockImport<B>>::Error>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, Box<dyn BlockImport<B, Error = Error> + Sync + Send + 'static, Global>: 'async_trait,
Check block preconditions.
source§fn import_block<'life0, 'async_trait>(
&'life0 mut self,
block: BlockImportParams<B>
) -> Pin<Box<dyn Future<Output = Result<ImportResult, <Box<dyn BlockImport<B, Error = Error> + Sync + Send + 'static, Global> as BlockImport<B>>::Error>> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
Box<dyn BlockImport<B, Error = Error> + Sync + Send + 'static, Global>: 'async_trait,
fn import_block<'life0, 'async_trait>( &'life0 mut self, block: BlockImportParams<B> ) -> Pin<Box<dyn Future<Output = Result<ImportResult, <Box<dyn BlockImport<B, Error = Error> + Sync + Send + 'static, Global> as BlockImport<B>>::Error>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, Box<dyn BlockImport<B, Error = Error> + Sync + Send + 'static, Global>: 'async_trait,
Import a block.