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

Commit

Permalink
Companion of paritytech/substrate#9684, !
Browse files Browse the repository at this point in the history
  • Loading branch information
aurexav committed Aug 4, 2022
1 parent 47a2158 commit 97c37dd
Showing 1 changed file with 7 additions and 21 deletions.
28 changes: 7 additions & 21 deletions node/cli/src/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
// --- std ---
use std::{env, path::PathBuf};
// --- paritytech ---
use sc_cli::{Error as CliError, Result as CliResult, Role, RuntimeVersion, SubstrateCli};
use sc_cli::{Error as CliError, Result as CliResult, RuntimeVersion, SubstrateCli};
use sc_service::{ChainSpec, DatabaseSource};
#[cfg(feature = "try-runtime")]
use sc_service::{Error as ServiceError, TaskManager};
Expand Down Expand Up @@ -174,29 +174,15 @@ pub fn run() -> CliResult<()> {

if chain_spec.is_pangolin() {
runner.run_node_until_exit(|config| async move {
match config.role {
Role::Light => panic!("Not support light client"),
_ => pangolin_service::new_full(
config,
authority_discovery_disabled,
eth_rpc_config,
)
.map(|(task_manager, _, _)| task_manager),
}
.map_err(CliError::from)
pangolin_service::new_full(config, authority_discovery_disabled, eth_rpc_config)
.map(|(task_manager, _, _)| task_manager)
.map_err(CliError::from)
})
} else {
runner.run_node_until_exit(|config| async move {
match config.role {
Role::Light => panic!("Not support light client"),
_ => pangoro_service::new_full(
config,
authority_discovery_disabled,
eth_rpc_config,
)
.map(|(task_manager, _, _)| task_manager),
}
.map_err(CliError::from)
pangoro_service::new_full(config, authority_discovery_disabled, eth_rpc_config)
.map(|(task_manager, _, _)| task_manager)
.map_err(CliError::from)
})
}
},
Expand Down

0 comments on commit 97c37dd

Please sign in to comment.