Trait sc_network_test::TestClientBuilderExt [−][src]
pub trait TestClientBuilderExt<B> { fn genesis_init_mut(&mut self) -> &mut GenesisParameters; fn build_with_longest_chain(
self
) -> (Client<B, LocalCallExecutor<Block<Header<u64, BlakeTwo256>, Extrinsic>, B, NativeExecutor<LocalExecutor>>, Block<Header<u64, BlakeTwo256>, Extrinsic>, RuntimeApi>, LongestChain<B, Block<Header<u64, BlakeTwo256>, Extrinsic>>); fn build_with_backend(
self
) -> (Client<B, LocalCallExecutor<Block<Header<u64, BlakeTwo256>, Extrinsic>, B, NativeExecutor<LocalExecutor>>, Block<Header<u64, BlakeTwo256>, Extrinsic>, RuntimeApi>, Arc<B>); fn changes_trie_config(
self,
config: Option<ChangesTrieConfiguration>
) -> Self { ... } fn set_heap_pages(self, heap_pages: u64) -> Self { ... } fn add_extra_child_storage<K, V>(
self,
child_info: &ChildInfo,
key: K,
value: V
) -> Self
where
K: Into<Vec<u8, Global>>,
V: Into<Vec<u8, Global>>, { ... } fn add_extra_storage<K, V>(self, key: K, value: V) -> Self
where
K: Into<Vec<u8, Global>>,
V: Into<Vec<u8, Global>>, { ... } fn build(
self
) -> Client<B, LocalCallExecutor<Block<Header<u64, BlakeTwo256>, Extrinsic>, B, NativeExecutor<LocalExecutor>>, Block<Header<u64, BlakeTwo256>, Extrinsic>, RuntimeApi> { ... } }
Expand description
A test-runtime
extensions to TestClientBuilder
.
Required methods
fn genesis_init_mut(&mut self) -> &mut GenesisParameters
fn genesis_init_mut(&mut self) -> &mut GenesisParameters
Returns a mutable reference to the genesis parameters.
fn build_with_longest_chain(
self
) -> (Client<B, LocalCallExecutor<Block<Header<u64, BlakeTwo256>, Extrinsic>, B, NativeExecutor<LocalExecutor>>, Block<Header<u64, BlakeTwo256>, Extrinsic>, RuntimeApi>, LongestChain<B, Block<Header<u64, BlakeTwo256>, Extrinsic>>)
fn build_with_longest_chain(
self
) -> (Client<B, LocalCallExecutor<Block<Header<u64, BlakeTwo256>, Extrinsic>, B, NativeExecutor<LocalExecutor>>, Block<Header<u64, BlakeTwo256>, Extrinsic>, RuntimeApi>, LongestChain<B, Block<Header<u64, BlakeTwo256>, Extrinsic>>)
Build the test client and longest chain selector.
fn build_with_backend(
self
) -> (Client<B, LocalCallExecutor<Block<Header<u64, BlakeTwo256>, Extrinsic>, B, NativeExecutor<LocalExecutor>>, Block<Header<u64, BlakeTwo256>, Extrinsic>, RuntimeApi>, Arc<B>)
fn build_with_backend(
self
) -> (Client<B, LocalCallExecutor<Block<Header<u64, BlakeTwo256>, Extrinsic>, B, NativeExecutor<LocalExecutor>>, Block<Header<u64, BlakeTwo256>, Extrinsic>, RuntimeApi>, Arc<B>)
Build the test client and the backend.
Provided methods
fn changes_trie_config(self, config: Option<ChangesTrieConfiguration>) -> Self
fn changes_trie_config(self, config: Option<ChangesTrieConfiguration>) -> Self
Set changes trie configuration for genesis.
fn set_heap_pages(self, heap_pages: u64) -> Self
fn set_heap_pages(self, heap_pages: u64) -> Self
Override the default value for Wasm heap pages.
fn build(
self
) -> Client<B, LocalCallExecutor<Block<Header<u64, BlakeTwo256>, Extrinsic>, B, NativeExecutor<LocalExecutor>>, Block<Header<u64, BlakeTwo256>, Extrinsic>, RuntimeApi>
fn build(
self
) -> Client<B, LocalCallExecutor<Block<Header<u64, BlakeTwo256>, Extrinsic>, B, NativeExecutor<LocalExecutor>>, Block<Header<u64, BlakeTwo256>, Extrinsic>, RuntimeApi>
Build the test client.
Implementations on Foreign Types
impl<B> TestClientBuilderExt<B> for TestClientBuilder<Block<Header<u64, BlakeTwo256>, Extrinsic>, LocalCallExecutor<Block<Header<u64, BlakeTwo256>, Extrinsic>, B, NativeExecutor<LocalExecutor>>, B, GenesisParameters> where
B: Backend<Block<Header<u64, BlakeTwo256>, Extrinsic>> + 'static,
impl<B> TestClientBuilderExt<B> for TestClientBuilder<Block<Header<u64, BlakeTwo256>, Extrinsic>, LocalCallExecutor<Block<Header<u64, BlakeTwo256>, Extrinsic>, B, NativeExecutor<LocalExecutor>>, B, GenesisParameters> where
B: Backend<Block<Header<u64, BlakeTwo256>, Extrinsic>> + 'static,
pub fn build_with_longest_chain(
self
) -> (Client<B, LocalCallExecutor<Block<Header<u64, BlakeTwo256>, Extrinsic>, B, NativeExecutor<LocalExecutor>>, Block<Header<u64, BlakeTwo256>, Extrinsic>, RuntimeApi>, LongestChain<B, Block<Header<u64, BlakeTwo256>, Extrinsic>>)
pub fn build_with_backend(
self
) -> (Client<B, LocalCallExecutor<Block<Header<u64, BlakeTwo256>, Extrinsic>, B, NativeExecutor<LocalExecutor>>, Block<Header<u64, BlakeTwo256>, Extrinsic>, RuntimeApi>, Arc<B>)