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

Commit

Permalink
Companion for paritytech/cumulus#1880
Browse files Browse the repository at this point in the history
  • Loading branch information
Guantong committed Jan 17, 2023
1 parent 71a09ea commit 8a7b991
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 33 deletions.
3 changes: 0 additions & 3 deletions node/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,7 @@ cumulus-client-network = { git = "https://github.com/paritytech
cumulus-client-service = { git = "https://github.com/paritytech/cumulus.git", branch = "polkadot-v0.9.36" }
cumulus-primitives-core = { git = "https://github.com/paritytech/cumulus.git", branch = "polkadot-v0.9.36" }
cumulus-primitives-parachain-inherent = { git = "https://github.com/paritytech/cumulus.git", branch = "polkadot-v0.9.36" }
cumulus-relay-chain-inprocess-interface = { git = "https://github.com/paritytech/cumulus.git", branch = "polkadot-v0.9.36" }
cumulus-relay-chain-interface = { git = "https://github.com/paritytech/cumulus.git", branch = "polkadot-v0.9.36" }
cumulus-relay-chain-rpc-interface = { git = "https://github.com/paritytech/cumulus.git", branch = "polkadot-v0.9.36" }
cumulus-relay-chain-minimal-node = { git = "https://github.com/paritytech/cumulus.git", branch = "polkadot-v0.9.36" }

# darwinia
crab-runtime = { path = "../runtime/crab" }
Expand Down
2 changes: 1 addition & 1 deletion node/src/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -568,7 +568,7 @@ pub fn run() -> Result<()> {
if config.role.is_authority() { "yes" } else { "no" }
);

if collator_options.relay_chain_rpc_url.is_some() && cli.relay_chain_args.len() > 0 {
if !collator_options.relay_chain_rpc_urls.is_empty() && cli.relay_chain_args.len() > 0 {
log::warn!("Detected relay chain node arguments together with --relay-chain-rpc-url. This command starts a minimal Polkadot node that only uses a network-related subset of all relay chain CLI options.");
}

Expand Down
29 changes: 0 additions & 29 deletions node/src/service/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -216,35 +216,6 @@ where
})
}

async fn build_relay_chain_interface(
polkadot_config: sc_service::Configuration,
parachain_config: &sc_service::Configuration,
telemetry_worker_handle: Option<sc_telemetry::TelemetryWorkerHandle>,
task_manager: &mut sc_service::TaskManager,
collator_options: cumulus_client_cli::CollatorOptions,
hwbench: Option<sc_sysinfo::HwBench>,
) -> cumulus_relay_chain_interface::RelayChainResult<(
Arc<(dyn 'static + cumulus_relay_chain_interface::RelayChainInterface)>,
Option<polkadot_service::CollatorPair>,
)> {
match collator_options.relay_chain_rpc_url {
Some(relay_chain_url) =>
cumulus_relay_chain_minimal_node::build_minimal_relay_chain_node(
polkadot_config,
task_manager,
relay_chain_url,
)
.await,
None => cumulus_relay_chain_inprocess_interface::build_inprocess_relay_chain(
polkadot_config,
parachain_config,
telemetry_worker_handle,
task_manager,
hwbench,
),
}
}

/// Start a node with the given parachain `Configuration` and relay chain `Configuration`.
///
/// This is the actual implementation that is abstract over the executor and the runtime api.
Expand Down

0 comments on commit 8a7b991

Please sign in to comment.