Let the clone wars begin! (#8731)

Sprinkle some `Clone` onto the cli commands.
This commit is contained in:
Bastian Köcher
2021-05-04 23:57:18 +02:00
committed by GitHub
parent 24eb647571
commit 37ea3958d9
21 changed files with 25 additions and 25 deletions
@@ -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")]
+4 -4
View File
@@ -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")]