Skip to content

Commit

Permalink
enable dev service exactly when using --dev
Browse files Browse the repository at this point in the history
  • Loading branch information
Joshy Orndorff committed Nov 22, 2023
1 parent 0bdb83f commit cbf7131
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions parachain-node/src/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ use sp_runtime::traits::AccountIdConversion;
use crate::{
chain_spec,
cli::{Cli, RelayChainCli, Subcommand},
dev_service::new_dev,
service::new_partial,
};

Expand Down Expand Up @@ -184,6 +185,14 @@ pub fn run() -> Result<()> {
let collator_options = cli.run.collator_options();

runner.run_node_until_exit(|config| async move {
// This is where we detect and enable the development service.
// For now it can ONLY be used for --dev. If we later desire more
// flexibility, we could take inspiration from:
// https://github.com/moonbeam-foundation/moonbeam/pull/260
if cli.run.base.shared_params.dev {
return new_dev(config).map_err(sc_cli::Error::Service);
}

let hwbench = (!cli.no_hardware_benchmarks)
.then_some(config.database.path().map(|database_path| {
let _ = std::fs::create_dir_all(database_path);
Expand Down

0 comments on commit cbf7131

Please sign in to comment.