Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
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
5 changes: 5 additions & 0 deletions prdoc/pr_10020.prdoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
title: 'pallet-revive: Add ExportChainSpec command to revive-dev-node'
doc:
- audience: Runtime Dev
description: "Add the `export-chain-spec` command to the revive-dev-node.\r\n"
crates: []
3 changes: 3 additions & 0 deletions substrate/frame/revive/dev-node/node/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@ pub enum Subcommand {
/// Export blocks.
ExportBlocks(sc_cli::ExportBlocksCmd),

/// Export the chain specification.
ExportChainSpec(sc_cli::ExportChainSpecCmd),

/// Export the state of a given block into a chain spec.
ExportState(sc_cli::ExportStateCmd),

Expand Down
4 changes: 4 additions & 0 deletions substrate/frame/revive/dev-node/node/src/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,10 @@ pub fn run() -> sc_cli::Result<()> {
Ok((cmd.run(client, config.database), task_manager))
})
},
Some(Subcommand::ExportChainSpec(cmd)) => {
let chain_spec = cli.load_spec(&cmd.chain)?;
cmd.run(chain_spec)
},
Some(Subcommand::ExportState(cmd)) => {
let runner = cli.create_runner(cmd)?;
runner.async_run(|config| {
Expand Down
Loading