Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Companion for paritytech/substrate#12264 #1661

Merged
merged 8 commits into from
Sep 26, 2022
2 changes: 1 addition & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -638,7 +638,7 @@ zombienet-0005-migrate_solo_to_para:
# This job cancels the whole pipeline if any of provided jobs fail.
# In a DAG, every jobs chain is executed independently of others. The `fail_fast` principle suggests
# to fail the pipeline as soon as possible to shorten the feedback loop.
cancel-pipeline:
.cancel-pipeline:
stage: .post
needs:
- job: test-linux-stable
Expand Down
3 changes: 2 additions & 1 deletion parachain-template/node/src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ where
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 (network, system_rpc_tx, start_network) =
let (network, system_rpc_tx, tx_handler_controller, start_network) =
sc_service::build_network(sc_service::BuildNetworkParams {
config: &parachain_config,
client: client.clone(),
Expand Down Expand Up @@ -327,6 +327,7 @@ where
backend: backend.clone(),
network: network.clone(),
system_rpc_tx,
tx_handler_controller,
telemetry: telemetry.as_mut(),
})?;

Expand Down
9 changes: 6 additions & 3 deletions polkadot-parachain/src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ where
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 (network, system_rpc_tx, start_network) =
let (network, system_rpc_tx, tx_handler_controller, start_network) =
sc_service::build_network(sc_service::BuildNetworkParams {
config: &parachain_config,
client: client.clone(),
Expand All @@ -404,6 +404,7 @@ where
backend: backend.clone(),
network: network.clone(),
system_rpc_tx,
tx_handler_controller,
telemetry: telemetry.as_mut(),
})?;

Expand Down Expand Up @@ -575,7 +576,7 @@ where
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 (network, system_rpc_tx, start_network) =
let (network, system_rpc_tx, tx_handler_controller, start_network) =
sc_service::build_network(sc_service::BuildNetworkParams {
config: &parachain_config,
client: client.clone(),
Expand Down Expand Up @@ -613,6 +614,7 @@ where
backend: backend.clone(),
network: network.clone(),
system_rpc_tx,
tx_handler_controller,
telemetry: telemetry.as_mut(),
})?;

Expand Down Expand Up @@ -1390,7 +1392,7 @@ where
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 (network, system_rpc_tx, start_network) =
let (network, system_rpc_tx, tx_handler_controller, start_network) =
sc_service::build_network(sc_service::BuildNetworkParams {
config: &parachain_config,
client: client.clone(),
Expand Down Expand Up @@ -1428,6 +1430,7 @@ where
backend: backend.clone(),
network: network.clone(),
system_rpc_tx,
tx_handler_controller,
telemetry: telemetry.as_mut(),
})?;

Expand Down
9 changes: 5 additions & 4 deletions test/service/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ use frame_system_rpc_runtime_api::AccountNonceApi;
use polkadot_primitives::v2::{CollatorPair, Hash as PHash, PersistedValidationData};
use polkadot_service::ProvideRuntimeApi;
use sc_client_api::execution_extensions::ExecutionStrategies;
use sc_network::{config::TransportConfig, multiaddr, NetworkService};
use sc_network_common::service::{NetworkBlock, NetworkStateInfo};
use sc_network::{multiaddr, NetworkBlock, NetworkService};
use sc_network_common::{config::TransportConfig, service::NetworkStateInfo};
use sc_service::{
config::{
BlocksPruning, DatabaseSource, KeystoreConfig, MultiaddrWithPeerId, NetworkConfiguration,
Expand Down Expand Up @@ -257,7 +257,7 @@ where

let prometheus_registry = parachain_config.prometheus_registry().cloned();
let import_queue = cumulus_client_service::SharedImportQueue::new(params.import_queue);
let (network, system_rpc_tx, start_network) =
let (network, system_rpc_tx, tx_handler_controller, start_network) =
sc_service::build_network(sc_service::BuildNetworkParams {
config: &parachain_config,
client: client.clone(),
Expand All @@ -284,6 +284,7 @@ where
backend,
network: network.clone(),
system_rpc_tx,
tx_handler_controller,
telemetry: None,
})?;

Expand Down Expand Up @@ -628,7 +629,7 @@ pub fn node_config(
if nodes_exlusive {
network_config.default_peers_set.reserved_nodes = nodes;
network_config.default_peers_set.non_reserved_mode =
sc_network::config::NonReservedPeerMode::Deny;
sc_network_common::config::NonReservedPeerMode::Deny;
} else {
network_config.boot_nodes = nodes;
}
Expand Down