mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 19:17:58 +00:00
Normalization of CLI options format (CamelCase => kebab-case) (#11194)
* Convert cli options from 'CamelCase' to 'kebab-case' * Remove not required 'as_str' for 'ExecutionStrategy' option
This commit is contained in:
@@ -118,7 +118,7 @@ impl BlockNumberOrHash {
|
||||
#[derive(Debug, Clone, Args)]
|
||||
pub struct CryptoSchemeFlag {
|
||||
/// cryptography scheme
|
||||
#[clap(long, value_name = "SCHEME", arg_enum, ignore_case = true, default_value = "Sr25519")]
|
||||
#[clap(long, value_name = "SCHEME", arg_enum, ignore_case = true, default_value = "sr25519")]
|
||||
pub scheme: CryptoScheme,
|
||||
}
|
||||
|
||||
@@ -126,7 +126,7 @@ pub struct CryptoSchemeFlag {
|
||||
#[derive(Debug, Clone, Args)]
|
||||
pub struct OutputTypeFlag {
|
||||
/// output format
|
||||
#[clap(long, value_name = "FORMAT", arg_enum, ignore_case = true, default_value = "Text")]
|
||||
#[clap(long, value_name = "FORMAT", arg_enum, ignore_case = true, default_value = "text")]
|
||||
pub output_type: OutputType,
|
||||
}
|
||||
|
||||
|
||||
@@ -132,12 +132,18 @@ pub struct NetworkParams {
|
||||
|
||||
/// Blockchain syncing mode.
|
||||
///
|
||||
/// - `Full`: Download and validate full blockchain history.
|
||||
///
|
||||
/// - `Fast`: Download blocks and the latest state only.
|
||||
///
|
||||
/// - `FastUnsafe`: Same as `Fast`, but skip downloading state proofs.
|
||||
#[clap(long, arg_enum, value_name = "SYNC_MODE", default_value = "Full", ignore_case(true))]
|
||||
/// - `full`: Download and validate full blockchain history.
|
||||
/// - `fast`: Download blocks and the latest state only.
|
||||
/// - `fast-unsafe`: Same as `fast`, but skip downloading state proofs.
|
||||
/// - `warp`: Download the latest state and proof.
|
||||
#[clap(
|
||||
long,
|
||||
arg_enum,
|
||||
value_name = "SYNC_MODE",
|
||||
default_value = "full",
|
||||
ignore_case = true,
|
||||
verbatim_doc_comment
|
||||
)]
|
||||
pub sync: SyncMode,
|
||||
}
|
||||
|
||||
|
||||
@@ -66,7 +66,7 @@ pub struct NodeKeyParams {
|
||||
///
|
||||
/// The node's secret key determines the corresponding public key and hence the
|
||||
/// node's peer ID in the context of libp2p.
|
||||
#[clap(long, value_name = "TYPE", arg_enum, ignore_case = true, default_value = "Ed25519")]
|
||||
#[clap(long, value_name = "TYPE", arg_enum, ignore_case = true, default_value = "ed25519")]
|
||||
pub node_key_type: NodeKeyType,
|
||||
|
||||
/// The file from which to read the node's secret key to use for libp2p networking.
|
||||
|
||||
@@ -40,7 +40,7 @@ pub struct OffchainWorkerParams {
|
||||
value_name = "ENABLED",
|
||||
arg_enum,
|
||||
ignore_case = true,
|
||||
default_value = "WhenValidating"
|
||||
default_value = "when-validating"
|
||||
)]
|
||||
pub enabled: OffchainWorkerEnabled,
|
||||
|
||||
|
||||
@@ -76,7 +76,7 @@ pub struct SharedParams {
|
||||
pub tracing_targets: Option<String>,
|
||||
|
||||
/// Receiver to process tracing messages.
|
||||
#[clap(long, value_name = "RECEIVER", arg_enum, ignore_case = true, default_value = "Log")]
|
||||
#[clap(long, value_name = "RECEIVER", arg_enum, ignore_case = true, default_value = "log")]
|
||||
pub tracing_receiver: TracingReceiver,
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user