Trait tetcore_test_client::client_ext::ClientBlockImportExt[][src]

pub trait ClientBlockImportExt<Block: BlockT>: Sized {
    fn import(
        &mut self,
        origin: BlockOrigin,
        block: Block
    ) -> Result<(), ConsensusError>;
fn import_as_best(
        &mut self,
        origin: BlockOrigin,
        block: Block
    ) -> Result<(), ConsensusError>;
fn import_as_final(
        &mut self,
        origin: BlockOrigin,
        block: Block
    ) -> Result<(), ConsensusError>;
fn import_justified(
        &mut self,
        origin: BlockOrigin,
        block: Block,
        justification: Justification
    ) -> Result<(), ConsensusError>; }

Extension trait for a test client around block importing.

Required methods

fn import(
    &mut self,
    origin: BlockOrigin,
    block: Block
) -> Result<(), ConsensusError>
[src]

Import block to the chain. No finality.

fn import_as_best(
    &mut self,
    origin: BlockOrigin,
    block: Block
) -> Result<(), ConsensusError>
[src]

Import a block and make it our best block if possible.

fn import_as_final(
    &mut self,
    origin: BlockOrigin,
    block: Block
) -> Result<(), ConsensusError>
[src]

Import a block and finalize it.

fn import_justified(
    &mut self,
    origin: BlockOrigin,
    block: Block,
    justification: Justification
) -> Result<(), ConsensusError>
[src]

Import block with justification, finalizes block.

Loading content...

Implementations on Foreign Types

impl<Block: BlockT, T, Transaction> ClientBlockImportExt<Block> for Arc<T> where
    &'r T: BlockImport<Block, Error = ConsensusError, Transaction = Transaction>, 
[src]

This implementation is required, because of the weird api requirements around BlockImport.

Loading content...

Implementors

impl<B, E, RA, Block: BlockT> ClientBlockImportExt<Block> for Client<B, E, Block, RA> where
    Self: BlockImport<Block, Error = ConsensusError>, 
[src]

Loading content...