From f1a09b49c1eab9cff46a5538109b1b59272508a5 Mon Sep 17 00:00:00 2001 From: sam elamin Date: Mon, 12 Dec 2022 15:28:33 +0000 Subject: [PATCH] second round of comments from the PR on substrate --- client/network/src/lib.rs | 6 +++--- parachain-template/node/src/service.rs | 3 +-- polkadot-parachain/src/service.rs | 6 +++--- test/service/src/lib.rs | 4 ++-- 4 files changed, 9 insertions(+), 10 deletions(-) diff --git a/client/network/src/lib.rs b/client/network/src/lib.rs index d3d6ea90639..19bee674720 100644 --- a/client/network/src/lib.rs +++ b/client/network/src/lib.rs @@ -479,12 +479,12 @@ impl WaitForParachainTargetBlock { "cumulus-parachain-wait-for-target-block", None, async move { - tracing::debug!( + tracing::info!( target: LOG_TARGET, "waiting for target block in a background task...", ); Self::wait_for_target_block(sender, para_id, relay_chain_interface).await; - tracing::debug!(target: LOG_TARGET, "target block reached",); + tracing::info!(target: LOG_TARGET, "target block reached",); } .boxed(), ); @@ -548,7 +548,7 @@ impl WaitForParachainTargetBlock { let _ = sender.send(target_header); break } - tracing::debug!( + tracing::info!( target: LOG_TARGET, "waiting for relay chain sync to complete......", ); diff --git a/parachain-template/node/src/service.rs b/parachain-template/node/src/service.rs index fdfe05be450..a2674390827 100644 --- a/parachain-template/node/src/service.rs +++ b/parachain-template/node/src/service.rs @@ -26,13 +26,12 @@ use sc_consensus::ImportQueue; use sc_executor::NativeElseWasmExecutor; use sc_network::NetworkService; use sc_network_common::service::NetworkBlock; -use sc_service::{Configuration, PartialComponents, TFullBackend, TFullClient, TaskManager}; +use sc_service::{Configuration, PartialComponents, TFullBackend, TFullClient, TaskManager, WarpSyncParams}; use sc_telemetry::{Telemetry, TelemetryHandle, TelemetryWorker, TelemetryWorkerHandle}; use sp_keystore::SyncCryptoStorePtr; use substrate_prometheus_endpoint::Registry; use polkadot_service::CollatorPair; -use sc_network_common::sync::warp::WarpSyncParams; /// Native executor type. pub struct ParachainNativeExecutor; diff --git a/polkadot-parachain/src/service.rs b/polkadot-parachain/src/service.rs index e028aa235e7..deded654d7e 100644 --- a/polkadot-parachain/src/service.rs +++ b/polkadot-parachain/src/service.rs @@ -47,8 +47,8 @@ use sc_consensus::{ }; use sc_executor::WasmExecutor; use sc_network::NetworkService; -use sc_network_common::{service::NetworkBlock, sync::warp::WarpSyncParams}; -use sc_service::{Configuration, PartialComponents, TFullBackend, TFullClient, TaskManager}; +use sc_network_common::service::NetworkBlock; +use sc_service::{Configuration, PartialComponents, TFullBackend, TFullClient, TaskManager, WarpSyncParams}; use sc_telemetry::{Telemetry, TelemetryHandle, TelemetryWorker, TelemetryWorkerHandle}; use sp_api::{ApiExt, ConstructRuntimeApi}; use sp_consensus::CacheKeyId; @@ -404,7 +404,7 @@ where let validator = parachain_config.role.is_authority(); let prometheus_registry = parachain_config.prometheus_registry().cloned(); let transaction_pool = params.transaction_pool.clone(); - let import_queue = cumulus_client_service::SharedImportQueue::new(params.import_queue); + let import_queue_service = params.import_queue.service(); let warp_sync_params = match cumulus_client_network::WaitForParachainTargetBlock::::warp_sync_get( para_id, diff --git a/test/service/src/lib.rs b/test/service/src/lib.rs index b0bc5603888..e97021163db 100644 --- a/test/service/src/lib.rs +++ b/test/service/src/lib.rs @@ -51,7 +51,7 @@ use sc_client_api::execution_extensions::ExecutionStrategies; use sc_consensus::ImportQueue; use sc_network::{multiaddr, NetworkBlock, NetworkService}; use sc_network_common::{ - config::TransportConfig, service::NetworkStateInfo, sync::warp::WarpSyncParams, + config::TransportConfig, service::NetworkStateInfo }; use sc_service::{ config::{ @@ -59,7 +59,7 @@ use sc_service::{ OffchainWorkerConfig, PruningMode, WasmExecutionMethod, }, BasePath, ChainSpec, Configuration, Error as ServiceError, PartialComponents, Role, - RpcHandlers, TFullBackend, TFullClient, TaskManager, + RpcHandlers, TFullBackend, TFullClient, TaskManager, WarpSyncParams }; use sp_arithmetic::traits::SaturatedConversion; use sp_blockchain::HeaderBackend;