Skip to content

Commit

Permalink
Purge-chain to work for --dev (AcalaNetwork#1413)
Browse files Browse the repository at this point in the history
* add dev to purge-chain

* get to work
  • Loading branch information
ferrell-code authored Sep 15, 2021
1 parent 71f070a commit 9d38762
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions node/cli/src/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,14 @@ pub fn run() -> sc_cli::Result<()> {
Some(Subcommand::PurgeChain(cmd)) => {
let runner = cli.create_runner(cmd)?;
runner.sync_run(|config| {
// cumulus_client_cli::PurgeCommand fails to account for whether we are running --dev
let is_dev = cmd.base.shared_params.is_dev();

// uses base instead to run substrate's sc_cli::PurgeChain command
if is_dev {
return cmd.base.run(config.database);
}

let polkadot_cli = RelayChainCli::new(
&config,
[RelayChainCli::executable_name()]
Expand Down

0 comments on commit 9d38762

Please sign in to comment.