mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-30 18:57:57 +00:00
Companion for Substrate#5860 (#1061)
* Companion for Substrate#5860 * Update Substrate
This commit is contained in:
Generated
+209
-195
File diff suppressed because it is too large
Load Diff
@@ -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>())];
|
||||
|
||||
@@ -189,7 +189,6 @@ macro_rules! new_full_start {
|
||||
client.clone(),
|
||||
)?;
|
||||
|
||||
let spawner = |future| spawn_task_handle.spawn_blocking("import-queue-worker", future);
|
||||
let import_queue = babe::import_queue(
|
||||
babe_link.clone(),
|
||||
block_import.clone(),
|
||||
@@ -197,7 +196,7 @@ macro_rules! new_full_start {
|
||||
None,
|
||||
client,
|
||||
inherent_data_providers.clone(),
|
||||
spawner,
|
||||
spawn_task_handle,
|
||||
)?;
|
||||
|
||||
import_setup = Some((block_import, grandpa_link, babe_link));
|
||||
@@ -528,7 +527,6 @@ macro_rules! new_light {
|
||||
client.clone(),
|
||||
)?;
|
||||
|
||||
let spawner = |future| spawn_task_handle.spawn_blocking("importe-queue-worker", future);
|
||||
// FIXME: pruning task isn't started since light client doesn't do `AuthoritySetup`.
|
||||
let import_queue = babe::import_queue(
|
||||
babe_link,
|
||||
@@ -537,7 +535,7 @@ macro_rules! new_light {
|
||||
Some(Box::new(finality_proof_import)),
|
||||
client,
|
||||
inherent_data_providers.clone(),
|
||||
spawner,
|
||||
spawn_task_handle,
|
||||
)?;
|
||||
|
||||
Ok((import_queue, finality_proof_request_builder))
|
||||
|
||||
Reference in New Issue
Block a user