mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 12:51:05 +00:00
Build LongestChain with TestClientBuilder (#2792)
* Switch to `TestClientBuilder` and support generating LongestChain * Make sure test-client works without the wasm blob * Use `TestClientBuilder` in more places
This commit is contained in:
@@ -26,7 +26,7 @@ use crate::{TestClient, AccountKeyring};
|
||||
use runtime_primitives::traits::Block as BlockT;
|
||||
use crate::backend;
|
||||
use crate::blockchain::{Backend as BlockChainBackendT, HeaderBackend};
|
||||
use crate::{BlockBuilderExt, new_with_backend};
|
||||
use crate::{BlockBuilderExt, TestClientBuilder};
|
||||
use runtime::{self, Transfer};
|
||||
use runtime_primitives::generic::BlockId;
|
||||
|
||||
@@ -40,7 +40,7 @@ pub fn test_leaves_for_backend<B: 'static>(backend: Arc<B>) where
|
||||
// B2 -> C3
|
||||
// A1 -> D2
|
||||
|
||||
let client = new_with_backend(backend.clone(), false);
|
||||
let client = TestClientBuilder::new_with_backend(backend.clone()).build();
|
||||
let blockchain = backend.blockchain();
|
||||
|
||||
let genesis_hash = client.info().chain.genesis_hash;
|
||||
@@ -156,7 +156,7 @@ pub fn test_children_for_backend<B: 'static>(backend: Arc<B>) where
|
||||
// B2 -> C3
|
||||
// A1 -> D2
|
||||
|
||||
let client = new_with_backend(backend.clone(), false);
|
||||
let client = TestClientBuilder::new_with_backend(backend.clone()).build();
|
||||
let blockchain = backend.blockchain();
|
||||
|
||||
// G -> A1
|
||||
@@ -246,7 +246,7 @@ pub fn test_blockchain_query_by_number_gets_canonical<B: 'static>(backend: Arc<B
|
||||
// A1 -> B2 -> B3 -> B4
|
||||
// B2 -> C3
|
||||
// A1 -> D2
|
||||
let client = new_with_backend(backend.clone(), false);
|
||||
let client = TestClientBuilder::new_with_backend(backend.clone()).build();
|
||||
let blockchain = backend.blockchain();
|
||||
|
||||
// G -> A1
|
||||
|
||||
Reference in New Issue
Block a user