mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 21:37:56 +00:00
Let the clone wars begin! (#8731)
Sprinkle some `Clone` onto the cli commands.
This commit is contained in:
@@ -27,7 +27,7 @@ use structopt::StructOpt;
|
||||
use std::io::Write;
|
||||
|
||||
/// The `build-spec` command used to build a specification.
|
||||
#[derive(Debug, StructOpt)]
|
||||
#[derive(Debug, StructOpt, Clone)]
|
||||
pub struct BuildSpecCmd {
|
||||
/// Force raw genesis storage output.
|
||||
#[structopt(long = "raw")]
|
||||
|
||||
@@ -25,7 +25,7 @@ use std::{fmt::Debug, str::FromStr, sync::Arc};
|
||||
use structopt::StructOpt;
|
||||
|
||||
/// The `check-block` command used to validate blocks.
|
||||
#[derive(Debug, StructOpt)]
|
||||
#[derive(Debug, StructOpt, Clone)]
|
||||
pub struct CheckBlockCmd {
|
||||
/// Block hash or number
|
||||
#[structopt(value_name = "HASH or NUMBER")]
|
||||
|
||||
@@ -34,7 +34,7 @@ use std::sync::Arc;
|
||||
use structopt::StructOpt;
|
||||
|
||||
/// The `export-blocks` command used to export blocks.
|
||||
#[derive(Debug, StructOpt)]
|
||||
#[derive(Debug, StructOpt, Clone)]
|
||||
pub struct ExportBlocksCmd {
|
||||
/// Output file name or stdout if unspecified.
|
||||
#[structopt(parse(from_os_str))]
|
||||
|
||||
@@ -27,7 +27,7 @@ use sc_client_api::{StorageProvider, UsageProvider};
|
||||
|
||||
/// The `export-state` command used to export the state of a given block into
|
||||
/// a chain spec.
|
||||
#[derive(Debug, StructOpt)]
|
||||
#[derive(Debug, StructOpt, Clone)]
|
||||
pub struct ExportStateCmd {
|
||||
/// Block hash or number.
|
||||
#[structopt(value_name = "HASH or NUMBER")]
|
||||
|
||||
@@ -24,7 +24,7 @@ use crate::{
|
||||
};
|
||||
|
||||
/// The `generate` command
|
||||
#[derive(Debug, StructOpt)]
|
||||
#[derive(Debug, StructOpt, Clone)]
|
||||
#[structopt(name = "generate", about = "Generate a random account")]
|
||||
pub struct GenerateCmd {
|
||||
/// The number of words in the phrase to generate. One of 12 (default), 15, 18, 21 and 24.
|
||||
|
||||
@@ -29,7 +29,7 @@ use sc_keystore::LocalKeystore;
|
||||
use sc_service::config::{KeystoreConfig, BasePath};
|
||||
|
||||
/// The `insert` command
|
||||
#[derive(Debug, StructOpt)]
|
||||
#[derive(Debug, StructOpt, Clone)]
|
||||
#[structopt(
|
||||
name = "insert",
|
||||
about = "Insert a key to the keystore of a node."
|
||||
|
||||
@@ -26,7 +26,7 @@ use std::io::{self, Write};
|
||||
use structopt::StructOpt;
|
||||
|
||||
/// The `purge-chain` command used to remove the whole chain.
|
||||
#[derive(Debug, StructOpt)]
|
||||
#[derive(Debug, StructOpt, Clone)]
|
||||
pub struct PurgeChainCmd {
|
||||
/// Skip interactive prompt by answering yes automatically.
|
||||
#[structopt(short = "y")]
|
||||
|
||||
@@ -35,7 +35,7 @@ use std::net::{IpAddr, Ipv4Addr, SocketAddr};
|
||||
use structopt::StructOpt;
|
||||
|
||||
/// The `run` command used to run a node.
|
||||
#[derive(Debug, StructOpt)]
|
||||
#[derive(Debug, StructOpt, Clone)]
|
||||
pub struct RunCmd {
|
||||
/// Enable validator mode.
|
||||
///
|
||||
|
||||
@@ -22,7 +22,7 @@ use structopt::StructOpt;
|
||||
use sp_core::crypto::SecretString;
|
||||
|
||||
/// The `sign` command
|
||||
#[derive(Debug, StructOpt)]
|
||||
#[derive(Debug, StructOpt, Clone)]
|
||||
#[structopt(
|
||||
name = "sign",
|
||||
about = "Sign a message, with a given (secret) key"
|
||||
|
||||
@@ -29,7 +29,7 @@ use sp_runtime::traits::IdentifyAccount;
|
||||
use utils::print_from_uri;
|
||||
|
||||
/// The `vanity` command
|
||||
#[derive(Debug, StructOpt)]
|
||||
#[derive(Debug, StructOpt, Clone)]
|
||||
#[structopt(
|
||||
name = "vanity",
|
||||
about = "Generate a seed that provides a vanity address"
|
||||
|
||||
@@ -23,7 +23,7 @@ use sp_core::{Public, crypto::Ss58Codec};
|
||||
use structopt::StructOpt;
|
||||
|
||||
/// The `verify` command
|
||||
#[derive(Debug, StructOpt)]
|
||||
#[derive(Debug, StructOpt, Clone)]
|
||||
#[structopt(
|
||||
name = "verify",
|
||||
about = "Verify a signature for a message, provided on STDIN, with a given (public or secret) key"
|
||||
|
||||
@@ -21,7 +21,7 @@ use structopt::StructOpt;
|
||||
use sc_service::TransactionStorageMode;
|
||||
|
||||
/// Parameters for block import.
|
||||
#[derive(Debug, StructOpt)]
|
||||
#[derive(Debug, StructOpt, Clone)]
|
||||
pub struct DatabaseParams {
|
||||
/// Select database backend to use.
|
||||
#[structopt(
|
||||
|
||||
@@ -28,7 +28,7 @@ use structopt::StructOpt;
|
||||
use std::path::PathBuf;
|
||||
|
||||
/// Parameters for block import.
|
||||
#[derive(Debug, StructOpt)]
|
||||
#[derive(Debug, StructOpt, Clone)]
|
||||
pub struct ImportParams {
|
||||
#[allow(missing_docs)]
|
||||
#[structopt(flatten)]
|
||||
@@ -125,7 +125,7 @@ impl ImportParams {
|
||||
}
|
||||
|
||||
/// Execution strategies parameters.
|
||||
#[derive(Debug, StructOpt)]
|
||||
#[derive(Debug, StructOpt, Clone)]
|
||||
pub struct ExecutionStrategiesParams {
|
||||
/// The means of execution used when calling into the runtime for importing blocks as
|
||||
/// part of an initial sync.
|
||||
|
||||
@@ -27,7 +27,7 @@ use sp_core::crypto::SecretString;
|
||||
const DEFAULT_KEYSTORE_CONFIG_PATH: &'static str = "keystore";
|
||||
|
||||
/// Parameters of the keystore
|
||||
#[derive(Debug, StructOpt)]
|
||||
#[derive(Debug, StructOpt, Clone)]
|
||||
pub struct KeystoreParams {
|
||||
/// Specify custom URIs to connect to for keystore-services
|
||||
#[structopt(long = "keystore-uri")]
|
||||
|
||||
@@ -75,7 +75,7 @@ impl GenericNumber {
|
||||
}
|
||||
|
||||
/// Wrapper type that is either a `Hash` or the number of a `Block`.
|
||||
#[derive(Debug)]
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct BlockNumberOrHash(String);
|
||||
|
||||
impl FromStr for BlockNumberOrHash {
|
||||
@@ -119,7 +119,7 @@ impl BlockNumberOrHash {
|
||||
|
||||
|
||||
/// Optional flag for specifying crypto algorithm
|
||||
#[derive(Debug, StructOpt)]
|
||||
#[derive(Debug, StructOpt, Clone)]
|
||||
pub struct CryptoSchemeFlag {
|
||||
/// cryptography scheme
|
||||
#[structopt(
|
||||
@@ -133,7 +133,7 @@ pub struct CryptoSchemeFlag {
|
||||
}
|
||||
|
||||
/// Optional flag for specifying output type
|
||||
#[derive(Debug, StructOpt)]
|
||||
#[derive(Debug, StructOpt, Clone)]
|
||||
pub struct OutputTypeFlag {
|
||||
/// output format
|
||||
#[structopt(
|
||||
@@ -147,7 +147,7 @@ pub struct OutputTypeFlag {
|
||||
}
|
||||
|
||||
/// Optional flag for specifying network scheme
|
||||
#[derive(Debug, StructOpt)]
|
||||
#[derive(Debug, StructOpt, Clone)]
|
||||
pub struct NetworkSchemeFlag {
|
||||
/// network address format
|
||||
#[structopt(
|
||||
|
||||
@@ -26,7 +26,7 @@ use std::{borrow::Cow, path::PathBuf};
|
||||
use structopt::StructOpt;
|
||||
|
||||
/// Parameters used to create the network configuration.
|
||||
#[derive(Debug, StructOpt)]
|
||||
#[derive(Debug, StructOpt, Clone)]
|
||||
pub struct NetworkParams {
|
||||
/// Specify a list of bootnodes.
|
||||
#[structopt(long = "bootnodes", value_name = "ADDR")]
|
||||
|
||||
@@ -31,7 +31,7 @@ const NODE_KEY_ED25519_FILE: &str = "secret_ed25519";
|
||||
|
||||
/// Parameters used to create the `NodeKeyConfig`, which determines the keypair
|
||||
/// used for libp2p networking.
|
||||
#[derive(Debug, StructOpt)]
|
||||
#[derive(Debug, StructOpt, Clone)]
|
||||
pub struct NodeKeyParams {
|
||||
/// The secret key to use for libp2p networking.
|
||||
///
|
||||
|
||||
@@ -31,7 +31,7 @@ use crate::error;
|
||||
use crate::OffchainWorkerEnabled;
|
||||
|
||||
/// Offchain worker related parameters.
|
||||
#[derive(Debug, StructOpt)]
|
||||
#[derive(Debug, StructOpt, Clone)]
|
||||
pub struct OffchainWorkerParams {
|
||||
/// Should execute offchain workers on every block.
|
||||
///
|
||||
|
||||
@@ -21,7 +21,7 @@ use sc_service::{PruningMode, Role, KeepBlocks};
|
||||
use structopt::StructOpt;
|
||||
|
||||
/// Parameters to define the pruning mode
|
||||
#[derive(Debug, StructOpt)]
|
||||
#[derive(Debug, StructOpt, Clone)]
|
||||
pub struct PruningParams {
|
||||
/// Specify the state pruning mode, a number of blocks to keep or 'archive'.
|
||||
///
|
||||
|
||||
@@ -22,7 +22,7 @@ use structopt::StructOpt;
|
||||
use crate::arg_enums::TracingReceiver;
|
||||
|
||||
/// Shared parameters used by all `CoreParams`.
|
||||
#[derive(Debug, StructOpt)]
|
||||
#[derive(Debug, StructOpt, Clone)]
|
||||
pub struct SharedParams {
|
||||
/// Specify the chain specification.
|
||||
///
|
||||
|
||||
@@ -20,7 +20,7 @@ use sc_service::config::TransactionPoolOptions;
|
||||
use structopt::StructOpt;
|
||||
|
||||
/// Parameters used to create the pool configuration.
|
||||
#[derive(Debug, StructOpt)]
|
||||
#[derive(Debug, StructOpt, Clone)]
|
||||
pub struct TransactionPoolParams {
|
||||
/// Maximum number of transactions in the transaction pool.
|
||||
#[structopt(long = "pool-limit", value_name = "COUNT", default_value = "8192")]
|
||||
|
||||
Reference in New Issue
Block a user