pub type ParachainBlockImport = ParachainBlockImport<NodeBlock, SlotBasedBlockImport<NodeBlock, Arc<Client>, Client>, Backend>;
Expand description
The block-import type being used by the test service.
Aliased Type§
struct ParachainBlockImport { /* private fields */ }
Implementations
Source§impl<Block, BI, BE> ParachainBlockImport<Block, BI, BE>
impl<Block, BI, BE> ParachainBlockImport<Block, BI, BE>
Sourcepub fn new(inner: BI, backend: Arc<BE>) -> ParachainBlockImport<Block, BI, BE>
pub fn new(inner: BI, backend: Arc<BE>) -> ParachainBlockImport<Block, BI, BE>
Create a new instance.
The number of leaves per level limit is set to LevelLimit::Default
.
Sourcepub fn new_with_limit(
inner: BI,
backend: Arc<BE>,
level_leaves_max: LevelLimit,
) -> ParachainBlockImport<Block, BI, BE>
pub fn new_with_limit( inner: BI, backend: Arc<BE>, level_leaves_max: LevelLimit, ) -> ParachainBlockImport<Block, BI, BE>
Create a new instance with an explicit limit to the number of leaves per level.
This function alone doesn’t enforce the limit on levels for old imported blocks, the limit is eventually enforced only when new blocks are imported.
Sourcepub fn new_with_delayed_best_block(
inner: BI,
backend: Arc<BE>,
) -> ParachainBlockImport<Block, BI, BE>
pub fn new_with_delayed_best_block( inner: BI, backend: Arc<BE>, ) -> ParachainBlockImport<Block, BI, BE>
Create a new instance which delays setting the best block.
The number of leaves per level limit is set to LevelLimit::Default
.
Trait Implementations
Source§impl<Block, BI, BE> BlockImport<Block> for ParachainBlockImport<Block, BI, BE>
impl<Block, BI, BE> BlockImport<Block> for ParachainBlockImport<Block, BI, BE>
Source§type Error = <BI as BlockImport<Block>>::Error
type Error = <BI as BlockImport<Block>>::Error
The error type.
Source§fn check_block<'life0, 'async_trait>(
&'life0 self,
block: BlockCheckParams<Block>,
) -> Pin<Box<dyn Future<Output = Result<ImportResult, <ParachainBlockImport<Block, BI, BE> as BlockImport<Block>>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
ParachainBlockImport<Block, BI, BE>: 'async_trait,
fn check_block<'life0, 'async_trait>(
&'life0 self,
block: BlockCheckParams<Block>,
) -> Pin<Box<dyn Future<Output = Result<ImportResult, <ParachainBlockImport<Block, BI, BE> as BlockImport<Block>>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
ParachainBlockImport<Block, BI, BE>: 'async_trait,
Check block preconditions.
Source§fn import_block<'life0, 'async_trait>(
&'life0 self,
params: BlockImportParams<Block>,
) -> Pin<Box<dyn Future<Output = Result<ImportResult, <ParachainBlockImport<Block, BI, BE> as BlockImport<Block>>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
ParachainBlockImport<Block, BI, BE>: 'async_trait,
fn import_block<'life0, 'async_trait>(
&'life0 self,
params: BlockImportParams<Block>,
) -> Pin<Box<dyn Future<Output = Result<ImportResult, <ParachainBlockImport<Block, BI, BE> as BlockImport<Block>>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
ParachainBlockImport<Block, BI, BE>: 'async_trait,
Import a block.
Source§impl<Block, I, BE> Clone for ParachainBlockImport<Block, I, BE>
impl<Block, I, BE> Clone for ParachainBlockImport<Block, I, BE>
Source§fn clone(&self) -> ParachainBlockImport<Block, I, BE>
fn clone(&self) -> ParachainBlockImport<Block, I, BE>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read more