Add Key Subcommand to node-template (#7615)

This commit is contained in:
Benjamin Kampmann
2020-11-27 16:54:45 +01:00
committed by GitHub
parent b4ee48ee18
commit 07c173af63
2 changed files with 3 additions and 0 deletions
@@ -12,6 +12,8 @@ pub struct Cli {
#[derive(Debug, StructOpt)]
pub enum Subcommand {
/// Key management cli utilities
Key(sc_cli::KeySubcommand),
/// Build a chain specification.
BuildSpec(sc_cli::BuildSpecCmd),
@@ -66,6 +66,7 @@ pub fn run() -> sc_cli::Result<()> {
let cli = Cli::from_args();
match &cli.subcommand {
Some(Subcommand::Key(cmd)) => cmd.run(),
Some(Subcommand::BuildSpec(cmd)) => {
let runner = cli.create_runner(cmd)?;
runner.sync_run(|config| cmd.run(config.chain_spec, config.network))