referrerpolicy=no-referrer-when-downgrade
cumulus_test_service

Type Alias ParachainBlockImport

Source
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>
where Block: Block, BE: Backend<Block>,

Source

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.

Source

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.

Source

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>
where Block: Block, BI: BlockImport<Block> + Send + Sync, BE: Backend<Block>,

Source§

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,

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,

Import a block.
Source§

impl<Block, I, BE> Clone for ParachainBlockImport<Block, I, BE>
where Block: Block, I: Clone,

Source§

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)

Performs copy-assignment from source. Read more
Source§

impl<B, BI, BE> ParachainBlockImportMarker for ParachainBlockImport<B, BI, BE>
where B: Block,