diff --git a/substrate/client/cli/src/commands/mod.rs b/substrate/client/cli/src/commands/mod.rs index 50e34856f12d61a833d2c7f75742ddaa65f733c3..d87b08f7f49828ef48bb469c016d2ac65e507906 100644 --- a/substrate/client/cli/src/commands/mod.rs +++ b/substrate/client/cli/src/commands/mod.rs @@ -50,7 +50,7 @@ const DEFAULT_NETWORK_CONFIG_PATH : &'static str = "network"; /// `Run` are exported as main executable parameters. #[derive(Debug, Clone, StructOpt)] pub enum Subcommand { - /// Build a spec.json file, outputing to stdout. + /// Build a spec.json file, outputs to stdout. BuildSpec(build_spec_cmd::BuildSpecCmd), /// Export blocks to a file. @@ -70,7 +70,7 @@ pub enum Subcommand { } impl Subcommand { - /// Get the shared parameters of a `CoreParams` command + /// Get the shared parameters of a `CoreParams` command. pub fn get_shared_params(&self) -> &SharedParams { use Subcommand::*; @@ -84,7 +84,7 @@ impl Subcommand { } } - /// Run any `CoreParams` command + /// Run any `CoreParams` command. pub fn run<B, BC, BB>( self, config: Configuration, @@ -107,7 +107,7 @@ impl Subcommand { } } - /// Update and prepare a `Configuration` with command line parameters + /// Update and prepare a `Configuration` with command line parameters. pub fn update_config<F>( &self, mut config: &mut Configuration, diff --git a/substrate/client/cli/src/commands/runcmd.rs b/substrate/client/cli/src/commands/runcmd.rs index 354448636342802dfe84699ca3d6fa517aef931c..c8af14359ce71bd429ab11f0d2f541c56e7e86d3 100644 --- a/substrate/client/cli/src/commands/runcmd.rs +++ b/substrate/client/cli/src/commands/runcmd.rs @@ -82,7 +82,7 @@ pub struct RunCmd { )] pub sentry: bool, - /// Disable GRANDPA voter when running in validator mode, otherwise disables the GRANDPA observer. + /// Disable GRANDPA voter when running in validator mode, otherwise disable the GRANDPA observer. #[structopt(long = "no-grandpa")] pub no_grandpa: bool, @@ -92,7 +92,7 @@ pub struct RunCmd { /// Listen to all RPC interfaces. /// - /// Default is local. Note: not all RPC methods are safe to be exposed publicly. Use a RPC proxy + /// Default is local. Note: not all RPC methods are safe to be exposed publicly. Use an RPC proxy /// server to filter out dangerous methods. More details: https://github.com/paritytech/substrate/wiki/Public-RPC. /// Use `--unsafe-rpc-external` to suppress the warning if you understand the risks. #[structopt(long = "rpc-external")] @@ -106,7 +106,7 @@ pub struct RunCmd { /// Listen to all Websocket interfaces. /// - /// Default is local. Note: not all RPC methods are safe to be exposed publicly. Use a RPC proxy + /// Default is local. Note: not all RPC methods are safe to be exposed publicly. Use an RPC proxy /// server to filter out dangerous methods. More details: https://github.com/paritytech/substrate/wiki/Public-RPC. /// Use `--unsafe-ws-external` to suppress the warning if you understand the risks. #[structopt(long = "ws-external")] @@ -169,7 +169,7 @@ pub struct RunCmd { /// The URL of the telemetry server to connect to. /// - /// This flag can be passed multiple times as a mean to specify multiple + /// This flag can be passed multiple times as a means to specify multiple /// telemetry endpoints. Verbosity levels range from 0-9, with 0 denoting /// the least verbosity. If no verbosity level is specified the default is /// 0. @@ -275,7 +275,7 @@ pub struct RunCmd { } impl RunCmd { - /// Get the `Sr25519Keyring` matching one of the flag + /// Get the `Sr25519Keyring` matching one of the flag. pub fn get_keyring(&self) -> Option<sp_keyring::Sr25519Keyring> { use sp_keyring::Sr25519Keyring::*; @@ -290,7 +290,7 @@ impl RunCmd { else { None } } - /// Update and prepare a `Configuration` with command line parameters of `RunCmd` and `VersionInfo` + /// Update and prepare a `Configuration` with command line parameters of `RunCmd` and `VersionInfo`. pub fn update_config<F>( &self, mut config: &mut Configuration, @@ -444,7 +444,7 @@ impl RunCmd { Ok(()) } - /// Run the command that runs the node + /// Run the command that runs the node. pub fn run<FNL, FNF, SL, SF>( self, config: Configuration, @@ -489,7 +489,7 @@ impl RunCmd { } } -/// Check whether a node name is considered as valid +/// Check whether a node name is considered as valid. pub fn is_node_name_valid(_name: &str) -> Result<(), &str> { let name = _name.to_string(); if name.chars().count() >= NODE_NAME_MAX_LENGTH { @@ -586,7 +586,7 @@ fn parse_telemetry_endpoints(s: &str) -> Result<(String, u8), Box<dyn std::error /// handling of `structopt`. #[derive(Clone, Debug)] pub enum Cors { - /// All hosts allowed + /// All hosts allowed. All, /// Only hosts on the list are allowed. List(Vec<String>), @@ -601,7 +601,7 @@ impl From<Cors> for Option<Vec<String>> { } } -/// Parse cors origins +/// Parse cors origins. fn parse_cors(s: &str) -> Result<Cors, Box<dyn std::error::Error>> { let mut is_all = false; let mut origins = Vec::new(); diff --git a/substrate/client/cli/src/params/import_params.rs b/substrate/client/cli/src/params/import_params.rs index 2b826d69c7fb22269f893a7154b35ce6579e9447..b647feeece30b8c34b74b0a33633f5380bfb21fd 100644 --- a/substrate/client/cli/src/params/import_params.rs +++ b/substrate/client/cli/src/params/import_params.rs @@ -62,11 +62,11 @@ pub struct ImportParams { #[structopt(long = "state-cache-size", value_name = "Bytes", default_value = "67108864")] pub state_cache_size: usize, - /// Comma separated list of targets for tracing + /// Comma separated list of targets for tracing. #[structopt(long = "tracing-targets", value_name = "TARGETS")] pub tracing_targets: Option<String>, - /// Receiver to process tracing messages + /// Receiver to process tracing messages. #[structopt( long = "tracing-receiver", value_name = "RECEIVER", diff --git a/substrate/client/cli/src/params/network_configuration_params.rs b/substrate/client/cli/src/params/network_configuration_params.rs index 974fa0be937a70dd117914b04aaaa31031705cf2..4de5e44fb5ace05f79b7c86739f2637b2fc650f0 100644 --- a/substrate/client/cli/src/params/network_configuration_params.rs +++ b/substrate/client/cli/src/params/network_configuration_params.rs @@ -83,9 +83,9 @@ pub struct NetworkConfigurationParams { #[structopt(long = "no-mdns")] pub no_mdns: bool, - /// Maximum number of peers to ask the same blocks in parallel. + /// Maximum number of peers from which to ask for the same blocks in parallel. /// - /// This allows downlading announced blocks from multiple peers. Decrease to save + /// This allows downloading announced blocks from multiple peers. Decrease to save /// traffic and risk increased latency. #[structopt(long = "max-parallel-downloads", value_name = "COUNT", default_value = "5")] pub max_parallel_downloads: u32, diff --git a/substrate/client/cli/src/params/node_key_params.rs b/substrate/client/cli/src/params/node_key_params.rs index aef3af94c77f29b7b0401f55133ca621448907aa..c55ec8ee692db5715c88414c905f87fc20ca51fa 100644 --- a/substrate/client/cli/src/params/node_key_params.rs +++ b/substrate/client/cli/src/params/node_key_params.rs @@ -38,7 +38,7 @@ pub struct NodeKeyParams { /// `--node-key-type` as follows: /// /// `ed25519`: - /// The value is parsed as a hex-encoded Ed25519 32 bytes secret key, + /// The value is parsed as a hex-encoded Ed25519 32 byte secret key, /// i.e. 64 hex characters. /// /// The value of this option takes precedence over `--node-key-file`. @@ -82,7 +82,7 @@ pub struct NodeKeyParams { /// as follows: /// /// `ed25519`: - /// The file must contain an unencoded 32 bytes Ed25519 secret key. + /// The file must contain an unencoded 32 byte Ed25519 secret key. /// /// If the file does not exist, it is created with a newly generated secret key of /// the chosen type. diff --git a/substrate/client/cli/src/params/shared_params.rs b/substrate/client/cli/src/params/shared_params.rs index 310e3de5da8d0c54b58bc478667aa273b93df72b..41b9cce8264cc0ce46de7d81661b396f4275266b 100644 --- a/substrate/client/cli/src/params/shared_params.rs +++ b/substrate/client/cli/src/params/shared_params.rs @@ -30,7 +30,7 @@ const DEFAULT_DB_CONFIG_PATH : &'static str = "db"; /// Shared parameters used by all `CoreParams`. #[derive(Debug, StructOpt, Clone)] pub struct SharedParams { - /// Specify the chain specification (one of dev, local or staging). + /// Specify the chain specification (one of dev, local, or staging). #[structopt(long = "chain", value_name = "CHAIN_SPEC")] pub chain: Option<String>, @@ -42,7 +42,10 @@ pub struct SharedParams { #[structopt(long = "base-path", short = "d", value_name = "PATH", parse(from_os_str))] pub base_path: Option<PathBuf>, - /// Sets a custom logging filter. + /// Sets a custom logging filter. Syntax is <target>=<level>, e.g. -lsync=debug. + /// + /// Log levels (least to most verbose) are error, warn, info, debug, and trace. + /// By default, all targets log `info`. The global log level can be set with -l<level>. #[structopt(short = "l", long = "log", value_name = "LOG_PATTERN")] pub log: Option<String>, }