parity: hide legacy options from cli --help (#8967)
* parity: hide legacy options from cli --help * parity: run a spellchecker over --help * parity: fix casing in cli usage
This commit is contained in:
parent
dec390a89f
commit
edd90f153c
@ -304,7 +304,7 @@ usage! {
|
|||||||
"--db-path=[PATH]",
|
"--db-path=[PATH]",
|
||||||
"Specify the database directory path",
|
"Specify the database directory path",
|
||||||
|
|
||||||
["Convenience options"]
|
["Convenience Options"]
|
||||||
FLAG flag_unsafe_expose: (bool) = false, or |c: &Config| c.misc.as_ref()?.unsafe_expose,
|
FLAG flag_unsafe_expose: (bool) = false, or |c: &Config| c.misc.as_ref()?.unsafe_expose,
|
||||||
"--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-api,secretstore,stratum,dapps,secretstore-http]-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-api,secretstore,stratum,dapps,secretstore-http]-interface=all --*-hosts=all This option is UNSAFE and should be used with great care!",
|
||||||
@ -317,14 +317,14 @@ usage! {
|
|||||||
"--ports-shift=[SHIFT]",
|
"--ports-shift=[SHIFT]",
|
||||||
"Add SHIFT to all port numbers Parity is listening on. Includes network port and all servers (RPC, WebSockets, UI, IPFS, SecretStore).",
|
"Add SHIFT to all port numbers Parity is listening on. Includes network port and all servers (RPC, WebSockets, UI, IPFS, SecretStore).",
|
||||||
|
|
||||||
["Account options"]
|
["Account Options"]
|
||||||
FLAG flag_no_hardware_wallets: (bool) = false, or |c: &Config| c.account.as_ref()?.disable_hardware.clone(),
|
FLAG flag_no_hardware_wallets: (bool) = false, or |c: &Config| c.account.as_ref()?.disable_hardware.clone(),
|
||||||
"--no-hardware-wallets",
|
"--no-hardware-wallets",
|
||||||
"Disables hardware wallet support.",
|
"Disables hardware wallet support.",
|
||||||
|
|
||||||
FLAG flag_fast_unlock: (bool) = false, or |c: &Config| c.account.as_ref()?.fast_unlock.clone(),
|
FLAG flag_fast_unlock: (bool) = false, or |c: &Config| c.account.as_ref()?.fast_unlock.clone(),
|
||||||
"--fast-unlock",
|
"--fast-unlock",
|
||||||
"Use drasticly faster unlocking mode. This setting causes raw secrets to be stored unprotected in memory, so use with care.",
|
"Use drastically faster unlocking mode. This setting causes raw secrets to be stored unprotected in memory, so use with care.",
|
||||||
|
|
||||||
ARG arg_keys_iterations: (u32) = 10240u32, or |c: &Config| c.account.as_ref()?.keys_iterations.clone(),
|
ARG arg_keys_iterations: (u32) = 10240u32, or |c: &Config| c.account.as_ref()?.keys_iterations.clone(),
|
||||||
"--keys-iterations=[NUM]",
|
"--keys-iterations=[NUM]",
|
||||||
@ -342,7 +342,7 @@ usage! {
|
|||||||
"--password=[FILE]...",
|
"--password=[FILE]...",
|
||||||
"Provide a file containing a password for unlocking an account. Leading and trailing whitespace is trimmed.",
|
"Provide a file containing a password for unlocking an account. Leading and trailing whitespace is trimmed.",
|
||||||
|
|
||||||
["Private transactions options"]
|
["Private Transactions Options"]
|
||||||
FLAG flag_private_enabled: (bool) = false, or |c: &Config| c.private_tx.as_ref()?.enabled,
|
FLAG flag_private_enabled: (bool) = false, or |c: &Config| c.private_tx.as_ref()?.enabled,
|
||||||
"--private-tx-enabled",
|
"--private-tx-enabled",
|
||||||
"Enable private transactions.",
|
"Enable private transactions.",
|
||||||
@ -371,12 +371,12 @@ usage! {
|
|||||||
"--private-passwords=[FILE]...",
|
"--private-passwords=[FILE]...",
|
||||||
"Provide a file containing passwords for unlocking accounts (signer, private account, validators).",
|
"Provide a file containing passwords for unlocking accounts (signer, private account, validators).",
|
||||||
|
|
||||||
["UI options"]
|
["UI Options"]
|
||||||
ARG arg_ui_path: (String) = "$BASE/signer", or |c: &Config| c.ui.as_ref()?.path.clone(),
|
ARG arg_ui_path: (String) = "$BASE/signer", or |c: &Config| c.ui.as_ref()?.path.clone(),
|
||||||
"--ui-path=[PATH]",
|
"--ui-path=[PATH]",
|
||||||
"Specify directory where Trusted UIs tokens should be stored.",
|
"Specify directory where Trusted UIs tokens should be stored.",
|
||||||
|
|
||||||
["Networking options"]
|
["Networking Options"]
|
||||||
FLAG flag_no_warp: (bool) = false, or |c: &Config| c.network.as_ref()?.warp.clone().map(|w| !w),
|
FLAG flag_no_warp: (bool) = false, or |c: &Config| c.network.as_ref()?.warp.clone().map(|w| !w),
|
||||||
"--no-warp",
|
"--no-warp",
|
||||||
"Disable syncing from the snapshot over the network.",
|
"Disable syncing from the snapshot over the network.",
|
||||||
@ -449,7 +449,7 @@ usage! {
|
|||||||
"--reserved-peers=[FILE]",
|
"--reserved-peers=[FILE]",
|
||||||
"Provide a file containing enodes, one per line. These nodes will always have a reserved slot on top of the normal maximum peers.",
|
"Provide a file containing enodes, one per line. These nodes will always have a reserved slot on top of the normal maximum peers.",
|
||||||
|
|
||||||
["API and console options – RPC"]
|
["API and Console Options – RPC"]
|
||||||
FLAG flag_no_jsonrpc: (bool) = false, or |c: &Config| c.rpc.as_ref()?.disable.clone(),
|
FLAG flag_no_jsonrpc: (bool) = false, or |c: &Config| c.rpc.as_ref()?.disable.clone(),
|
||||||
"--no-jsonrpc",
|
"--no-jsonrpc",
|
||||||
"Disable the JSON-RPC API server.",
|
"Disable the JSON-RPC API server.",
|
||||||
@ -482,7 +482,7 @@ usage! {
|
|||||||
"--jsonrpc-server-threads=[NUM]",
|
"--jsonrpc-server-threads=[NUM]",
|
||||||
"Enables multiple threads handling incoming connections for HTTP JSON-RPC server.",
|
"Enables multiple threads handling incoming connections for HTTP JSON-RPC server.",
|
||||||
|
|
||||||
["API and console options – WebSockets"]
|
["API and Console Options – WebSockets"]
|
||||||
FLAG flag_no_ws: (bool) = false, or |c: &Config| c.websockets.as_ref()?.disable.clone(),
|
FLAG flag_no_ws: (bool) = false, or |c: &Config| c.websockets.as_ref()?.disable.clone(),
|
||||||
"--no-ws",
|
"--no-ws",
|
||||||
"Disable the WebSockets server.",
|
"Disable the WebSockets server.",
|
||||||
@ -511,7 +511,7 @@ usage! {
|
|||||||
"--ws-max-connections=[CONN]",
|
"--ws-max-connections=[CONN]",
|
||||||
"Maximal number of allowed concurrent WS connections.",
|
"Maximal number of allowed concurrent WS connections.",
|
||||||
|
|
||||||
["API and console options – IPC"]
|
["API and Console Options – IPC"]
|
||||||
FLAG flag_no_ipc: (bool) = false, or |c: &Config| c.ipc.as_ref()?.disable.clone(),
|
FLAG flag_no_ipc: (bool) = false, or |c: &Config| c.ipc.as_ref()?.disable.clone(),
|
||||||
"--no-ipc",
|
"--no-ipc",
|
||||||
"Disable JSON-RPC over IPC service.",
|
"Disable JSON-RPC over IPC service.",
|
||||||
@ -524,7 +524,7 @@ usage! {
|
|||||||
"--ipc-apis=[APIS]",
|
"--ipc-apis=[APIS]",
|
||||||
"Specify custom API set available via JSON-RPC over IPC using a comma-delimited list of API names. Possible names are: all, safe, web3, net, eth, pubsub, personal, signer, parity, parity_pubsub, parity_accounts, parity_set, traces, rpc, secretstore, shh, shh_pubsub. You can also disable a specific API by putting '-' in the front, example: all,-personal. safe contains: web3, net, eth, pubsub, parity, parity_pubsub, traces, rpc, shh, shh_pubsub",
|
"Specify custom API set available via JSON-RPC over IPC using a comma-delimited list of API names. Possible names are: all, safe, web3, net, eth, pubsub, personal, signer, parity, parity_pubsub, parity_accounts, parity_set, traces, rpc, secretstore, shh, shh_pubsub. You can also disable a specific API by putting '-' in the front, example: all,-personal. safe contains: web3, net, eth, pubsub, parity, parity_pubsub, traces, rpc, shh, shh_pubsub",
|
||||||
|
|
||||||
["API and console options – Dapps"]
|
["API and Console Options – Dapps"]
|
||||||
FLAG flag_no_dapps: (bool) = false, or |c: &Config| c.dapps.as_ref()?.disable.clone(),
|
FLAG flag_no_dapps: (bool) = false, or |c: &Config| c.dapps.as_ref()?.disable.clone(),
|
||||||
"--no-dapps",
|
"--no-dapps",
|
||||||
"Disable the Dapps server (e.g. status page).",
|
"Disable the Dapps server (e.g. status page).",
|
||||||
@ -533,7 +533,7 @@ usage! {
|
|||||||
"--dapps-path=[PATH]",
|
"--dapps-path=[PATH]",
|
||||||
"Specify directory where dapps should be installed.",
|
"Specify directory where dapps should be installed.",
|
||||||
|
|
||||||
["API and console options – IPFS"]
|
["API and Console Options – IPFS"]
|
||||||
FLAG flag_ipfs_api: (bool) = false, or |c: &Config| c.ipfs.as_ref()?.enable.clone(),
|
FLAG flag_ipfs_api: (bool) = false, or |c: &Config| c.ipfs.as_ref()?.enable.clone(),
|
||||||
"--ipfs-api",
|
"--ipfs-api",
|
||||||
"Enable IPFS-compatible HTTP API.",
|
"Enable IPFS-compatible HTTP API.",
|
||||||
@ -554,7 +554,7 @@ usage! {
|
|||||||
"--ipfs-api-cors=[URL]",
|
"--ipfs-api-cors=[URL]",
|
||||||
"Specify CORS header for IPFS API responses. Special options: \"all\", \"none\".",
|
"Specify CORS header for IPFS API responses. Special options: \"all\", \"none\".",
|
||||||
|
|
||||||
["Secret store options"]
|
["Secret Store Options"]
|
||||||
FLAG flag_no_secretstore: (bool) = false, or |c: &Config| c.secretstore.as_ref()?.disable.clone(),
|
FLAG flag_no_secretstore: (bool) = false, or |c: &Config| c.secretstore.as_ref()?.disable.clone(),
|
||||||
"--no-secretstore",
|
"--no-secretstore",
|
||||||
"Disable Secret Store functionality.",
|
"Disable Secret Store functionality.",
|
||||||
@ -627,7 +627,7 @@ usage! {
|
|||||||
"--secretstore-admin=[PUBLIC]",
|
"--secretstore-admin=[PUBLIC]",
|
||||||
"Hex-encoded public key of secret store administrator.",
|
"Hex-encoded public key of secret store administrator.",
|
||||||
|
|
||||||
["Sealing/Mining options"]
|
["Sealing/Mining Options"]
|
||||||
FLAG flag_force_sealing: (bool) = false, or |c: &Config| c.mining.as_ref()?.force_sealing.clone(),
|
FLAG flag_force_sealing: (bool) = false, or |c: &Config| c.mining.as_ref()?.force_sealing.clone(),
|
||||||
"--force-sealing",
|
"--force-sealing",
|
||||||
"Force the node to author new blocks as if it were always sealing/mining.",
|
"Force the node to author new blocks as if it were always sealing/mining.",
|
||||||
@ -642,7 +642,7 @@ usage! {
|
|||||||
|
|
||||||
FLAG flag_tx_queue_no_unfamiliar_locals: (bool) = false, or |c: &Config| c.mining.as_ref()?.tx_queue_no_unfamiliar_locals.clone(),
|
FLAG flag_tx_queue_no_unfamiliar_locals: (bool) = false, or |c: &Config| c.mining.as_ref()?.tx_queue_no_unfamiliar_locals.clone(),
|
||||||
"--tx-queue-no-unfamiliar-locals",
|
"--tx-queue-no-unfamiliar-locals",
|
||||||
"Transactions recieved via local means (RPC, WS, etc) will be treated as external if the sending account is unknown.",
|
"Transactions received via local means (RPC, WS, etc) will be treated as external if the sending account is unknown.",
|
||||||
|
|
||||||
FLAG flag_refuse_service_transactions: (bool) = false, or |c: &Config| c.mining.as_ref()?.refuse_service_transactions.clone(),
|
FLAG flag_refuse_service_transactions: (bool) = false, or |c: &Config| c.mining.as_ref()?.refuse_service_transactions.clone(),
|
||||||
"--refuse-service-transactions",
|
"--refuse-service-transactions",
|
||||||
@ -773,7 +773,7 @@ usage! {
|
|||||||
"--can-restart",
|
"--can-restart",
|
||||||
"Executable will auto-restart if exiting with 69",
|
"Executable will auto-restart if exiting with 69",
|
||||||
|
|
||||||
["Miscellaneous options"]
|
["Miscellaneous Options"]
|
||||||
FLAG flag_no_color: (bool) = false, or |c: &Config| c.misc.as_ref()?.color.map(|c| !c).clone(),
|
FLAG flag_no_color: (bool) = false, or |c: &Config| c.misc.as_ref()?.color.map(|c| !c).clone(),
|
||||||
"--no-color",
|
"--no-color",
|
||||||
"Don't use terminal color codes in output.",
|
"Don't use terminal color codes in output.",
|
||||||
@ -798,7 +798,7 @@ usage! {
|
|||||||
"--log-file=[FILENAME]",
|
"--log-file=[FILENAME]",
|
||||||
"Specify a filename into which logging should be appended.",
|
"Specify a filename into which logging should be appended.",
|
||||||
|
|
||||||
["Footprint options"]
|
["Footprint Options"]
|
||||||
FLAG flag_fast_and_loose: (bool) = false, or |c: &Config| c.footprint.as_ref()?.fast_and_loose.clone(),
|
FLAG flag_fast_and_loose: (bool) = false, or |c: &Config| c.footprint.as_ref()?.fast_and_loose.clone(),
|
||||||
"--fast-and-loose",
|
"--fast-and-loose",
|
||||||
"Disables DB WAL, which gives a significant speed up but means an unclean exit is unrecoverable.",
|
"Disables DB WAL, which gives a significant speed up but means an unclean exit is unrecoverable.",
|
||||||
@ -829,7 +829,7 @@ usage! {
|
|||||||
|
|
||||||
ARG arg_cache_size_blocks: (u32) = 8u32, or |c: &Config| c.footprint.as_ref()?.cache_size_blocks.clone(),
|
ARG arg_cache_size_blocks: (u32) = 8u32, or |c: &Config| c.footprint.as_ref()?.cache_size_blocks.clone(),
|
||||||
"--cache-size-blocks=[MB]",
|
"--cache-size-blocks=[MB]",
|
||||||
"Specify the prefered size of the blockchain cache in megabytes.",
|
"Specify the preferred size of the blockchain cache in megabytes.",
|
||||||
|
|
||||||
ARG arg_cache_size_queue: (u32) = 40u32, or |c: &Config| c.footprint.as_ref()?.cache_size_queue.clone(),
|
ARG arg_cache_size_queue: (u32) = 40u32, or |c: &Config| c.footprint.as_ref()?.cache_size_queue.clone(),
|
||||||
"--cache-size-queue=[MB]",
|
"--cache-size-queue=[MB]",
|
||||||
@ -855,17 +855,17 @@ usage! {
|
|||||||
"--num-verifiers=[INT]",
|
"--num-verifiers=[INT]",
|
||||||
"Amount of verifier threads to use or to begin with, if verifier auto-scaling is enabled.",
|
"Amount of verifier threads to use or to begin with, if verifier auto-scaling is enabled.",
|
||||||
|
|
||||||
["Import/export options"]
|
["Import/export Options"]
|
||||||
FLAG flag_no_seal_check: (bool) = false, or |_| None,
|
FLAG flag_no_seal_check: (bool) = false, or |_| None,
|
||||||
"--no-seal-check",
|
"--no-seal-check",
|
||||||
"Skip block seal check.",
|
"Skip block seal check.",
|
||||||
|
|
||||||
["Snapshot options"]
|
["Snapshot Options"]
|
||||||
FLAG flag_no_periodic_snapshot: (bool) = false, or |c: &Config| c.snapshots.as_ref()?.disable_periodic.clone(),
|
FLAG flag_no_periodic_snapshot: (bool) = false, or |c: &Config| c.snapshots.as_ref()?.disable_periodic.clone(),
|
||||||
"--no-periodic-snapshot",
|
"--no-periodic-snapshot",
|
||||||
"Disable automated snapshots which usually occur once every 10000 blocks.",
|
"Disable automated snapshots which usually occur once every 10000 blocks.",
|
||||||
|
|
||||||
["Whisper options"]
|
["Whisper Options"]
|
||||||
FLAG flag_whisper: (bool) = false, or |c: &Config| c.whisper.as_ref()?.enabled,
|
FLAG flag_whisper: (bool) = false, or |c: &Config| c.whisper.as_ref()?.enabled,
|
||||||
"--whisper",
|
"--whisper",
|
||||||
"Enable the Whisper network.",
|
"Enable the Whisper network.",
|
||||||
@ -874,7 +874,7 @@ usage! {
|
|||||||
"--whisper-pool-size=[MB]",
|
"--whisper-pool-size=[MB]",
|
||||||
"Target size of the whisper message pool in megabytes.",
|
"Target size of the whisper message pool in megabytes.",
|
||||||
|
|
||||||
["Legacy options"]
|
["Legacy Options"]
|
||||||
FLAG flag_warp: (bool) = false, or |_| None,
|
FLAG flag_warp: (bool) = false, or |_| None,
|
||||||
"--warp",
|
"--warp",
|
||||||
"Does nothing; warp sync is enabled by default. Use --no-warp to disable.",
|
"Does nothing; warp sync is enabled by default. Use --no-warp to disable.",
|
||||||
|
@ -443,73 +443,71 @@ macro_rules! usage {
|
|||||||
// Arguments and flags
|
// Arguments and flags
|
||||||
let args_wrapper = Wrapper::new(term_width).initial_indent(TAB_TAB).subsequent_indent(TAB_TAB);
|
let args_wrapper = Wrapper::new(term_width).initial_indent(TAB_TAB).subsequent_indent(TAB_TAB);
|
||||||
$(
|
$(
|
||||||
help.push_str($group_name); help.push_str(":\n");
|
if $group_name != "Legacy Options" {
|
||||||
|
help.push_str($group_name); help.push_str(":\n");
|
||||||
$(
|
$(
|
||||||
help.push_str(&format!("{}{}\n{}\n",
|
help.push_str(&format!("{}{}\n{}\n",
|
||||||
TAB, $flag_usage,
|
TAB, $flag_usage,
|
||||||
args_wrapper.fill($flag_help)
|
args_wrapper.fill($flag_help)
|
||||||
));
|
));
|
||||||
help.push_str("\n");
|
help.push_str("\n");
|
||||||
)*
|
)*
|
||||||
|
$(
|
||||||
$(
|
if_option!(
|
||||||
if_option!(
|
$($arg_type_tt)+,
|
||||||
$($arg_type_tt)+,
|
THEN {
|
||||||
THEN {
|
if_option_vec!(
|
||||||
if_option_vec!(
|
$($arg_type_tt)+,
|
||||||
$($arg_type_tt)+,
|
THEN {
|
||||||
THEN {
|
help.push_str(&format!("{}{}\n{}\n",
|
||||||
help.push_str(&format!("{}{}\n{}\n",
|
TAB, $arg_usage,
|
||||||
TAB, $arg_usage,
|
args_wrapper.fill(format!(
|
||||||
args_wrapper.fill(format!(
|
"{} (default: {:?})",
|
||||||
"{} (default: {:?})",
|
$arg_help,
|
||||||
$arg_help,
|
{let x : inner_option_type!($($arg_type_tt)+)> = $arg_default; x}
|
||||||
{let x : inner_option_type!($($arg_type_tt)+)> = $arg_default; x}
|
).as_ref())
|
||||||
).as_ref())
|
))
|
||||||
))
|
}
|
||||||
}
|
ELSE {
|
||||||
ELSE {
|
help.push_str(&format!("{}{}\n{}\n",
|
||||||
help.push_str(&format!("{}{}\n{}\n",
|
TAB, $arg_usage,
|
||||||
TAB, $arg_usage,
|
args_wrapper.fill(format!(
|
||||||
args_wrapper.fill(format!(
|
"{}{}",
|
||||||
"{}{}",
|
$arg_help,
|
||||||
$arg_help,
|
$arg_default.map(|x: inner_option_type!($($arg_type_tt)+)| format!(" (default: {})",x)).unwrap_or("".to_owned())
|
||||||
$arg_default.map(|x: inner_option_type!($($arg_type_tt)+)| format!(" (default: {})",x)).unwrap_or("".to_owned())
|
).as_ref())
|
||||||
).as_ref())
|
))
|
||||||
))
|
}
|
||||||
}
|
)
|
||||||
)
|
}
|
||||||
}
|
ELSE {
|
||||||
ELSE {
|
if_vec!(
|
||||||
if_vec!(
|
$($arg_type_tt)+,
|
||||||
$($arg_type_tt)+,
|
THEN {
|
||||||
THEN {
|
help.push_str(&format!("{}{}\n{}\n", TAB, $arg_usage,
|
||||||
help.push_str(&format!("{}{}\n{}\n", TAB, $arg_usage,
|
args_wrapper.fill(format!(
|
||||||
args_wrapper.fill(format!(
|
"{} (default: {:?})",
|
||||||
"{} (default: {:?})",
|
$arg_help,
|
||||||
$arg_help,
|
{let x : $($arg_type_tt)+ = $arg_default; x}
|
||||||
{let x : $($arg_type_tt)+ = $arg_default; x}
|
).as_ref())
|
||||||
).as_ref())
|
))
|
||||||
))
|
}
|
||||||
}
|
ELSE {
|
||||||
ELSE {
|
help.push_str(&format!("{}{}\n{}\n", TAB, $arg_usage,
|
||||||
help.push_str(&format!("{}{}\n{}\n", TAB, $arg_usage,
|
args_wrapper.fill(format!(
|
||||||
args_wrapper.fill(format!(
|
"{} (default: {})",
|
||||||
"{} (default: {})",
|
$arg_help,
|
||||||
$arg_help,
|
$arg_default
|
||||||
$arg_default
|
).as_ref())
|
||||||
).as_ref())
|
))
|
||||||
))
|
}
|
||||||
}
|
)
|
||||||
)
|
}
|
||||||
}
|
);
|
||||||
);
|
help.push_str("\n");
|
||||||
help.push_str("\n");
|
)*
|
||||||
)*
|
}
|
||||||
|
|
||||||
)*
|
)*
|
||||||
|
|
||||||
help
|
help
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user