Companion for #6025 (#1098)

This commit is contained in:
Benjamin Kampmann
2020-05-15 19:35:39 +02:00
committed by GitHub
parent 5d58f7a43a
commit b660c226d8
5 changed files with 165 additions and 133 deletions
+134 -129
View File
File diff suppressed because it is too large Load Diff
+8 -1
View File
@@ -93,7 +93,14 @@ fn async_import_queue_drops() {
for _ in 0..100 { for _ in 0..100 {
let verifier = PassThroughVerifier(true); let verifier = PassThroughVerifier(true);
let queue = BasicQueue::new(verifier, Box::new(polkadot_test_runtime_client::new()), None, None, &executor); let queue = BasicQueue::new(
verifier,
Box::new(polkadot_test_runtime_client::new()),
None,
None,
&executor,
None
);
drop(queue); drop(queue);
} }
} }
+2
View File
@@ -574,6 +574,7 @@ pub trait TestNetFactory: Sized {
justification_import, justification_import,
finality_proof_import, finality_proof_import,
&sp_core::testing::SpawnBlockingExecutor::new(), &sp_core::testing::SpawnBlockingExecutor::new(),
None,
)); ));
let listen_addr = build_multiaddr![Memory(rand::random::<u64>())]; let listen_addr = build_multiaddr![Memory(rand::random::<u64>())];
@@ -650,6 +651,7 @@ pub trait TestNetFactory: Sized {
justification_import, justification_import,
finality_proof_import, finality_proof_import,
&sp_core::testing::SpawnBlockingExecutor::new(), &sp_core::testing::SpawnBlockingExecutor::new(),
None,
)); ));
let listen_addr = build_multiaddr![Memory(rand::random::<u64>())]; let listen_addr = build_multiaddr![Memory(rand::random::<u64>())];
+1 -1
View File
@@ -1245,7 +1245,7 @@ impl<T: Trait> Module<T> {
); );
ensure!( ensure!(
schedule.max_head_data_size >= candidate.candidate().head_data.0.len() as _, schedule.max_head_data_size as usize >= candidate.candidate().head_data.0.len(),
Error::<T>::HeadDataTooLarge, Error::<T>::HeadDataTooLarge,
); );
+20 -2
View File
@@ -166,7 +166,14 @@ macro_rules! new_full_start {
let pool = sc_transaction_pool::BasicPool::new(config, std::sync::Arc::new(pool_api), prometheus_registry); let pool = sc_transaction_pool::BasicPool::new(config, std::sync::Arc::new(pool_api), prometheus_registry);
Ok(pool) Ok(pool)
})? })?
.with_import_queue(|config, client, mut select_chain, _, spawn_task_handle| { .with_import_queue(|
config,
client,
mut select_chain,
_,
spawn_task_handle,
registry,
| {
let select_chain = select_chain.take() let select_chain = select_chain.take()
.ok_or_else(|| service::Error::SelectChainRequired)?; .ok_or_else(|| service::Error::SelectChainRequired)?;
@@ -200,6 +207,7 @@ macro_rules! new_full_start {
client, client,
inherent_data_providers.clone(), inherent_data_providers.clone(),
spawn_task_handle, spawn_task_handle,
registry,
)?; )?;
import_setup = Some((block_import, grandpa_link, babe_link)); import_setup = Some((block_import, grandpa_link, babe_link));
@@ -526,7 +534,16 @@ macro_rules! new_light {
); );
Ok(pool) Ok(pool)
})? })?
.with_import_queue_and_fprb(|_config, client, backend, fetcher, _select_chain, _, spawn_task_handle| { .with_import_queue_and_fprb(|
_config,
client,
backend,
fetcher,
_select_chain,
_,
spawn_task_handle,
registry,
| {
let fetch_checker = fetcher let fetch_checker = fetcher
.map(|fetcher| fetcher.checker().clone()) .map(|fetcher| fetcher.checker().clone())
.ok_or_else(|| "Trying to start light import queue without active fetch checker")?; .ok_or_else(|| "Trying to start light import queue without active fetch checker")?;
@@ -553,6 +570,7 @@ macro_rules! new_light {
client, client,
inherent_data_providers.clone(), inherent_data_providers.clone(),
spawn_task_handle, spawn_task_handle,
registry,
)?; )?;
Ok((import_queue, finality_proof_request_builder)) Ok((import_queue, finality_proof_request_builder))