Companion for Substrate#11062 (#1113)

* Align to changes in Substrate

* Align to the newest changes in substrate

* Update `Cargo.lock`

* Add hwbenches to `parachain-template` too

* update lockfile for {"polkadot"}

Co-authored-by: parity-processbot <>
This commit is contained in:
Koute
2022-04-26 18:51:18 +09:00
committed by GitHub
parent a715b8b551
commit 867eb8ebf9
11 changed files with 400 additions and 253 deletions
@@ -327,6 +327,7 @@ fn build_polkadot_full_node(
config: Configuration,
parachain_config: &Configuration,
telemetry_worker_handle: Option<TelemetryWorkerHandle>,
hwbench: Option<sc_sysinfo::HwBench>,
) -> Result<(NewFull<polkadot_client::Client>, Option<CollatorPair>), polkadot_service::Error> {
let is_light = matches!(config.role, Role::Light);
if is_light {
@@ -348,6 +349,7 @@ fn build_polkadot_full_node(
telemetry_worker_handle,
true,
polkadot_service::RealOverseerGen,
hwbench,
)?;
Ok((relay_chain_full_node, maybe_collator_key))
@@ -360,9 +362,14 @@ pub fn build_inprocess_relay_chain(
parachain_config: &Configuration,
telemetry_worker_handle: Option<TelemetryWorkerHandle>,
task_manager: &mut TaskManager,
hwbench: Option<sc_sysinfo::HwBench>,
) -> RelayChainResult<(Arc<(dyn RelayChainInterface + 'static)>, Option<CollatorPair>)> {
let (full_node, collator_key) =
build_polkadot_full_node(polkadot_config, parachain_config, telemetry_worker_handle)?;
let (full_node, collator_key) = build_polkadot_full_node(
polkadot_config,
parachain_config,
telemetry_worker_handle,
hwbench,
)?;
let sync_oracle: Box<dyn SyncOracle + Send + Sync> = Box::new(full_node.network.clone());
let sync_oracle = Arc::new(Mutex::new(sync_oracle));