mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-12 20:31:13 +00:00
Companion for Substrate#5860 (#1061)
* Companion for Substrate#5860 * Update Substrate
This commit is contained in:
@@ -88,14 +88,12 @@ fn import_single_good_block_without_header_fails() {
|
||||
|
||||
#[test]
|
||||
fn async_import_queue_drops() {
|
||||
let executor = sp_core::testing::SpawnBlockingExecutor::new();
|
||||
// Perform this test multiple times since it exhibits non-deterministic behavior.
|
||||
for _ in 0..100 {
|
||||
let verifier = PassThroughVerifier(true);
|
||||
|
||||
let threads_pool = futures::executor::ThreadPool::new().unwrap();
|
||||
let spawner = |future| threads_pool.spawn_ok(future);
|
||||
|
||||
let queue = BasicQueue::new(verifier, Box::new(polkadot_test_runtime_client::new()), None, None, spawner);
|
||||
let queue = BasicQueue::new(verifier, Box::new(polkadot_test_runtime_client::new()), None, None, &executor);
|
||||
drop(queue);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -570,15 +570,12 @@ pub trait TestNetFactory: Sized {
|
||||
);
|
||||
let verifier = VerifierAdapter::new(Arc::new(Mutex::new(Box::new(verifier) as Box<_>)));
|
||||
|
||||
let threads_pool = futures::executor::ThreadPool::new().unwrap();
|
||||
let spawner = |future| threads_pool.spawn_ok(future);
|
||||
|
||||
let import_queue = Box::new(BasicQueue::new(
|
||||
verifier.clone(),
|
||||
Box::new(block_import.clone()),
|
||||
justification_import,
|
||||
finality_proof_import,
|
||||
spawner,
|
||||
&sp_core::testing::SpawnBlockingExecutor::new(),
|
||||
));
|
||||
|
||||
let listen_addr = build_multiaddr![Memory(rand::random::<u64>())];
|
||||
@@ -649,15 +646,12 @@ pub trait TestNetFactory: Sized {
|
||||
);
|
||||
let verifier = VerifierAdapter::new(Arc::new(Mutex::new(Box::new(verifier) as Box<_>)));
|
||||
|
||||
let threads_pool = futures::executor::ThreadPool::new().unwrap();
|
||||
let spawner = |future| threads_pool.spawn_ok(future);
|
||||
|
||||
let import_queue = Box::new(BasicQueue::new(
|
||||
verifier.clone(),
|
||||
Box::new(block_import.clone()),
|
||||
justification_import,
|
||||
finality_proof_import,
|
||||
spawner,
|
||||
&sp_core::testing::SpawnBlockingExecutor::new(),
|
||||
));
|
||||
|
||||
let listen_addr = build_multiaddr![Memory(rand::random::<u64>())];
|
||||
|
||||
Reference in New Issue
Block a user