referrerpolicy=no-referrer-when-downgrade
sc_service_test

Trait TestNetNode

Source
pub trait TestNetNode:
    Clone
    + Future<Output = Result<(), Error>>
    + Send
    + 'static {
    type Block: BlockT;
    type Backend: Backend<Self::Block>;
    type Executor: CallExecutor<Self::Block> + Send + Sync;
    type RuntimeApi: Send + Sync;
    type TransactionPool: TransactionPool<Block = Self::Block>;

    // Required methods
    fn client(
        &self,
    ) -> Arc<Client<Self::Backend, Self::Executor, Self::Block, Self::RuntimeApi>>;
    fn transaction_pool(&self) -> Arc<Self::TransactionPool>;
    fn network(&self) -> Arc<dyn NetworkService>;
    fn sync(&self) -> &Arc<SyncingService<Self::Block>>;
    fn spawn_handle(&self) -> SpawnTaskHandle;
}

Required Associated Types§

Required Methods§

Source

fn client( &self, ) -> Arc<Client<Self::Backend, Self::Executor, Self::Block, Self::RuntimeApi>>

Source

fn transaction_pool(&self) -> Arc<Self::TransactionPool>

Source

fn network(&self) -> Arc<dyn NetworkService>

Source

fn sync(&self) -> &Arc<SyncingService<Self::Block>>

Source

fn spawn_handle(&self) -> SpawnTaskHandle

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<TBl, TBackend, TExec, TRtApi, TExPool> TestNetNode for TestNetComponents<TBl, TBackend, TExec, TRtApi, TExPool>
where TBl: BlockT, TBackend: Backend<TBl> + Send + Sync + 'static, TExec: CallExecutor<TBl> + Send + Sync + 'static, TRtApi: Send + Sync + 'static, TExPool: TransactionPool<Block = TBl> + Send + Sync + 'static,

Source§

type Block = TBl

Source§

type Backend = TBackend

Source§

type Executor = TExec

Source§

type RuntimeApi = TRtApi

Source§

type TransactionPool = TExPool