Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Revert "Revert "Deactivate mdns for polkadot node as it prevents the …
…process to exit properly""

This reverts commit ce1f38f.
  • Loading branch information
cecton committed Feb 11, 2020
commit 0e8f3d5ae23b90cd3f18fe72d6641df4bfe13c37
10 changes: 10 additions & 0 deletions test/parachain/src/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ use sp_runtime::{
traits::{Block as BlockT, Hash as HashT, Header as HeaderT},
BuildStorage,
};
use sc_network::config::TransportConfig;
use polkadot_service::ChainSpec as ChainSpecPolkadot;

use codec::Encode;
Expand Down Expand Up @@ -98,6 +99,7 @@ pub fn run(version: VersionInfo) -> error::Result<()> {
polkadot_config.config_dir = config.in_chain_config_dir("polkadot");

let polkadot_opt: PolkadotCli = sc_cli::from_iter(opt.relaychain_args, &version);
let allow_private_ipv4 = !polkadot_opt.run.network_config.no_private_ipv4;

polkadot_config.rpc_http = Some(DEFAULT_POLKADOT_RPC_HTTP.parse().unwrap());
polkadot_config.rpc_ws = Some(DEFAULT_POLKADOT_RPC_WS.parse().unwrap());
Expand All @@ -111,6 +113,14 @@ pub fn run(version: VersionInfo) -> error::Result<()> {
)?;
sc_cli::update_config_for_running_node(&mut polkadot_config, polkadot_opt.run)?;

// TODO: we disable mdns for the polkadot node because it prevents the process to exit
// properly. See https://github.com/paritytech/cumulus/issues/57
polkadot_config.network.transport = TransportConfig::Normal {
enable_mdns: false,
allow_private_ipv4,
wasm_external_transport: None,
};

match config.roles {
ServiceRoles::LIGHT => unimplemented!("Light client not supported!"),
_ => crate::service::run_collator(config, key, polkadot_config),
Expand Down