mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-22 22:01:08 +00:00
Change to use the same subcommand syntax as subkey (#8678)
* Change to use the same subcommand syntax as subkey * Update client/cli/src/commands/inspect_key.rs * revert to InspectKeyCmd struct
This commit is contained in:
@@ -41,7 +41,7 @@ pub enum Subcommand {
|
|||||||
name = "inspect",
|
name = "inspect",
|
||||||
about = "Decode given block or extrinsic using current native runtime."
|
about = "Decode given block or extrinsic using current native runtime."
|
||||||
)]
|
)]
|
||||||
Inspect(node_inspect::cli::InspectCmd),
|
Inspect(node_inspect::cli::InspectKeyCmd),
|
||||||
|
|
||||||
/// The custom benchmark subcommmand benchmarking runtime pallets.
|
/// The custom benchmark subcommmand benchmarking runtime pallets.
|
||||||
#[structopt(name = "benchmark", about = "Benchmark runtime pallets.")]
|
#[structopt(name = "benchmark", about = "Benchmark runtime pallets.")]
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ use structopt::StructOpt;
|
|||||||
|
|
||||||
/// The `inspect` command used to print decoded chain data.
|
/// The `inspect` command used to print decoded chain data.
|
||||||
#[derive(Debug, StructOpt)]
|
#[derive(Debug, StructOpt)]
|
||||||
pub struct InspectCmd {
|
pub struct InspectKeyCmd {
|
||||||
#[allow(missing_docs)]
|
#[allow(missing_docs)]
|
||||||
#[structopt(flatten)]
|
#[structopt(flatten)]
|
||||||
pub command: InspectSubCmd,
|
pub command: InspectSubCmd,
|
||||||
|
|||||||
@@ -18,14 +18,14 @@
|
|||||||
|
|
||||||
//! Command ran by the CLI
|
//! Command ran by the CLI
|
||||||
|
|
||||||
use crate::cli::{InspectCmd, InspectSubCmd};
|
use crate::cli::{InspectKeyCmd, InspectSubCmd};
|
||||||
use crate::Inspector;
|
use crate::Inspector;
|
||||||
use sc_cli::{CliConfiguration, ImportParams, Result, SharedParams};
|
use sc_cli::{CliConfiguration, ImportParams, Result, SharedParams};
|
||||||
use sc_service::{new_full_client, Configuration, NativeExecutionDispatch};
|
use sc_service::{new_full_client, Configuration, NativeExecutionDispatch};
|
||||||
use sp_runtime::traits::Block;
|
use sp_runtime::traits::Block;
|
||||||
use std::str::FromStr;
|
use std::str::FromStr;
|
||||||
|
|
||||||
impl InspectCmd {
|
impl InspectKeyCmd {
|
||||||
/// Run the inspect command, passing the inspector.
|
/// Run the inspect command, passing the inspector.
|
||||||
pub fn run<B, RA, EX>(&self, config: Configuration) -> Result<()>
|
pub fn run<B, RA, EX>(&self, config: Configuration) -> Result<()>
|
||||||
where
|
where
|
||||||
@@ -54,7 +54,7 @@ impl InspectCmd {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl CliConfiguration for InspectCmd {
|
impl CliConfiguration for InspectKeyCmd {
|
||||||
fn shared_params(&self) -> &SharedParams {
|
fn shared_params(&self) -> &SharedParams {
|
||||||
&self.shared_params
|
&self.shared_params
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ use structopt::StructOpt;
|
|||||||
/// The `inspect` command
|
/// The `inspect` command
|
||||||
#[derive(Debug, StructOpt)]
|
#[derive(Debug, StructOpt)]
|
||||||
#[structopt(
|
#[structopt(
|
||||||
name = "inspect-key",
|
name = "inspect",
|
||||||
about = "Gets a public key and a SS58 address from the provided Secret URI"
|
about = "Gets a public key and a SS58 address from the provided Secret URI"
|
||||||
)]
|
)]
|
||||||
pub struct InspectKeyCmd {
|
pub struct InspectKeyCmd {
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ pub enum KeySubcommand {
|
|||||||
Generate(GenerateCmd),
|
Generate(GenerateCmd),
|
||||||
|
|
||||||
/// Gets a public key and a SS58 address from the provided Secret URI
|
/// Gets a public key and a SS58 address from the provided Secret URI
|
||||||
InspectKey(InspectKeyCmd),
|
Inspect(InspectKeyCmd),
|
||||||
|
|
||||||
/// Print the peer ID corresponding to the node key in the given file
|
/// Print the peer ID corresponding to the node key in the given file
|
||||||
InspectNodeKey(InspectNodeKeyCmd),
|
InspectNodeKey(InspectNodeKeyCmd),
|
||||||
@@ -54,7 +54,7 @@ impl KeySubcommand {
|
|||||||
match self {
|
match self {
|
||||||
KeySubcommand::GenerateNodeKey(cmd) => cmd.run(),
|
KeySubcommand::GenerateNodeKey(cmd) => cmd.run(),
|
||||||
KeySubcommand::Generate(cmd) => cmd.run(),
|
KeySubcommand::Generate(cmd) => cmd.run(),
|
||||||
KeySubcommand::InspectKey(cmd) => cmd.run(),
|
KeySubcommand::Inspect(cmd) => cmd.run(),
|
||||||
KeySubcommand::Insert(cmd) => cmd.run(cli),
|
KeySubcommand::Insert(cmd) => cmd.run(cli),
|
||||||
KeySubcommand::InspectNodeKey(cmd) => cmd.run(),
|
KeySubcommand::InspectNodeKey(cmd) => cmd.run(),
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user