This repository has been archived by the owner on Nov 6, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Filter-out nodes.json (#7716) * Filter-out nodes.json * network: sort node table nodes by failure ratio * network: fix node table tests * network: fit node failure percentage into buckets of 5% * network: consider number of attempts in sorting of node table * network: fix node table grumbles * Fix client not being dropped on shutdown (#7695) * parity: wait for client to drop on shutdown * parity: fix grumbles in shutdown wait * parity: increase shutdown timeouts * Wrap --help output to 120 characters (#7626) * Update Clap dependency and remove workarounds * WIP * Remove line breaks in help messages for now * Multiple values can only be separated by commas (closes #7428) * Grumbles; refactor repeating code; add constant * Use a single Wrapper rather than allocate a new one for each call * Wrap --help to 120 characters rather than 100 characters
- Loading branch information
1 parent
835dcae
commit 19fc9fc
Showing
11 changed files
with
397 additions
and
218 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -257,12 +257,7 @@ usage! { | |
|
||
ARG arg_mode: (String) = "last", or |c: &Config| otry!(c.parity).mode.clone(), | ||
"--mode=[MODE]", | ||
"Set the operating mode. MODE can be one of: | ||
last - Uses the last-used mode, active if none. | ||
active - Parity continuously syncs the chain. | ||
passive - Parity syncs initially, then sleeps and wakes regularly to resync. | ||
dark - Parity syncs only when the RPC is active. | ||
offline - Parity doesn't sync.", | ||
"Set the operating mode. MODE can be one of: last - Uses the last-used mode, active if none; active - Parity continuously syncs the chain; passive - Parity syncs initially, then sleeps and wakes regularly to resync; dark - Parity syncs only when the RPC is active; offline - Parity doesn't sync.", | ||
|
||
ARG arg_mode_timeout: (u64) = 300u64, or |c: &Config| otry!(c.parity).mode_timeout.clone(), | ||
"--mode-timeout=[SECS]", | ||
|
@@ -274,19 +269,11 @@ usage! { | |
|
||
ARG arg_auto_update: (String) = "critical", or |c: &Config| otry!(c.parity).auto_update.clone(), | ||
"--auto-update=[SET]", | ||
"Set a releases set to automatically update and install. | ||
all - All updates in the our release track. | ||
critical - Only consensus/security updates. | ||
none - No updates will be auto-installed.", | ||
"Set a releases set to automatically update and install. SET can be one of: all - All updates in the our release track; critical - Only consensus/security updates; none - No updates will be auto-installed.", | ||
|
||
ARG arg_release_track: (String) = "current", or |c: &Config| otry!(c.parity).release_track.clone(), | ||
"--release-track=[TRACK]", | ||
"Set which release track we should use for updates. | ||
stable - Stable releases. | ||
beta - Beta releases. | ||
nightly - Nightly releases (unstable). | ||
testing - Testing releases (do not use). | ||
current - Whatever track this executable was released on", | ||
"Set which release track we should use for updates. TRACK can be one of: stable - Stable releases; beta - Beta releases; nightly - Nightly releases (unstable); testing - Testing releases (do not use); current - Whatever track this executable was released on.", | ||
|
||
ARG arg_chain: (String) = "foundation", or |c: &Config| otry!(c.parity).chain.clone(), | ||
"--chain=[CHAIN]", | ||
|
@@ -311,8 +298,7 @@ usage! { | |
["Convenience options"] | ||
FLAG flag_unsafe_expose: (bool) = false, or |c: &Config| otry!(c.misc).unsafe_expose, | ||
"--unsafe-expose", | ||
"All servers will listen on external interfaces and will be remotely accessible. It's equivalent with setting the following: --{{ws,jsonrpc,ui,ipfs,secret_store,stratum}}-interface=all --*-hosts=all | ||
This option is UNSAFE and should be used with great care!", | ||
"All servers will listen on external interfaces and will be remotely accessible. It's equivalent with setting the following: --{{ws,jsonrpc,ui,ipfs,secret_store,stratum}}-interface=all --*-hosts=all This option is UNSAFE and should be used with great care!", | ||
|
||
ARG arg_config: (String) = "$BASE/config.toml", or |_| None, | ||
"-c, --config=[CONFIG]", | ||
|
@@ -494,7 +480,7 @@ usage! { | |
|
||
ARG arg_ws_hosts: (String) = "none", or |c: &Config| otry!(c.websockets).hosts.as_ref().map(|vec| vec.join(",")), | ||
"--ws-hosts=[HOSTS]", | ||
"List of allowed Host header values. This option will validate the Host header sent by the browser, it is additional security against some attack vectors. Special options: \"all\", \"none\",.", | ||
"List of allowed Host header values. This option will validate the Host header sent by the browser, it is additional security against some attack vectors. Special options: \"all\", \"none\".", | ||
|
||
["API and console options – IPC"] | ||
FLAG flag_no_ipc: (bool) = false, or |c: &Config| otry!(c.ipc).disable.clone(), | ||
|
@@ -574,7 +560,7 @@ usage! { | |
|
||
ARG arg_secretstore_path: (String) = "$BASE/secretstore", or |c: &Config| otry!(c.secretstore).path.clone(), | ||
"--secretstore-path=[PATH]", | ||
"Specify directory where Secret Store should save its data..", | ||
"Specify directory where Secret Store should save its data.", | ||
|
||
ARG arg_secretstore_secret: (Option<String>) = None, or |c: &Config| otry!(c.secretstore).self_secret.clone(), | ||
"--secretstore-secret=[SECRET]", | ||
|
@@ -659,7 +645,7 @@ usage! { | |
|
||
ARG arg_tx_queue_gas: (String) = "off", or |c: &Config| otry!(c.mining).tx_queue_gas.clone(), | ||
"--tx-queue-gas=[LIMIT]", | ||
"Maximum amount of total gas for external transactions in the queue. LIMIT can be either an amount of gas or 'auto' or 'off'. 'auto' sets the limit to be 20x the current block gas limit..", | ||
"Maximum amount of total gas for external transactions in the queue. LIMIT can be either an amount of gas or 'auto' or 'off'. 'auto' sets the limit to be 20x the current block gas limit.", | ||
|
||
ARG arg_tx_queue_strategy: (String) = "gas_price", or |c: &Config| otry!(c.mining).tx_queue_strategy.clone(), | ||
"--tx-queue-strategy=[S]", | ||
|
@@ -766,7 +752,7 @@ usage! { | |
|
||
ARG arg_pruning_history: (u64) = 64u64, or |c: &Config| otry!(c.footprint).pruning_history.clone(), | ||
"--pruning-history=[NUM]", | ||
"Set a minimum number of recent states to keep when pruning is active..", | ||
"Set a minimum number of recent states to keep when pruning is active.", | ||
|
||
ARG arg_pruning_memory: (usize) = 32usize, or |c: &Config| otry!(c.footprint).pruning_memory.clone(), | ||
"--pruning-memory=[MB]", | ||
|
@@ -1307,12 +1293,15 @@ mod tests { | |
let args = Args::parse(&["parity", "--secretstore-nodes", "[email protected]:3333,[email protected]:4444"]).unwrap(); | ||
assert_eq!(args.arg_secretstore_nodes, "[email protected]:3333,[email protected]:4444"); | ||
|
||
// Arguments with a single value shouldn't accept multiple values | ||
let args = Args::parse(&["parity", "--auto-update", "critical", "all"]); | ||
assert!(args.is_err()); | ||
let args = Args::parse(&["parity", "--password", "~/.safe/1", "--password", "~/.safe/2", "--ui-port", "8123", "ui"]).unwrap(); | ||
assert_eq!(args.arg_password, vec!["~/.safe/1".to_owned(), "~/.safe/2".to_owned()]); | ||
assert_eq!(args.arg_ui_port, 8123); | ||
assert_eq!(args.cmd_ui, true); | ||
|
||
let args = Args::parse(&["parity", "--password", "~/.safe/1", "~/.safe/2"]).unwrap(); | ||
let args = Args::parse(&["parity", "--password", "~/.safe/1,~/.safe/2", "--ui-port", "8123", "ui"]).unwrap(); | ||
assert_eq!(args.arg_password, vec!["~/.safe/1".to_owned(), "~/.safe/2".to_owned()]); | ||
assert_eq!(args.arg_ui_port, 8123); | ||
assert_eq!(args.cmd_ui, true); | ||
} | ||
|
||
#[test] | ||
|
Oops, something went wrong.