diff --git a/parity/cli.rs b/parity/cli.rs index ef9ce8ce3..17954eb2a 100644 --- a/parity/cli.rs +++ b/parity/cli.rs @@ -52,12 +52,21 @@ Protocol Options: Account Options: --unlock ACCOUNTS Unlock ACCOUNTS for the duration of the execution. ACCOUNTS is a comma-delimited list of addresses. + Implies --no-signer. --password FILE Provide a file containing a password for unlocking an account. --keys-iterations NUM Specify the number of iterations to use when deriving key from the password (bigger is more secure) [default: 10240]. --no-import-keys Do not import keys from legacy clients. + --force-signer Enable Trusted Signer WebSocket endpoint used by + Signer UIs, even when --unlock is in use. + --no-signer Disable Trusted Signer WebSocket endpoint used by + Signer UIs. + --signer-port PORT Specify the port of Trusted Signer server + [default: 8180]. + --signer-path PATH Specify directory where Signer UIs tokens should + be stored. [default: $HOME/.parity/signer] Networking Options: --no-network Disable p2p networking. @@ -114,17 +123,6 @@ API and Console Options: --dapps-path PATH Specify directory where dapps should be installed. [default: $HOME/.parity/dapps] - --signer Enable Trusted Signer WebSocket endpoint used by - Signer UIs. Default if run with ui command. - --no-signer Disable Trusted Signer WebSocket endpoint used by - Signer UIs. Default if no command is specified. - --signer-port PORT Specify the port of Trusted Signer server - [default: 8180]. - --signer-path PATH Specify directory where Signer UIs tokens should - be stored. [default: $HOME/.parity/signer] - --no-token By default a new system UI security token will be - output on start up. This will prevent it. - Sealing/Mining Options: --author ADDRESS Specify the block author (aka "coinbase") address for sending block rewards from sealed blocks. @@ -309,11 +307,10 @@ pub struct Args { pub flag_dapps_user: Option, pub flag_dapps_pass: Option, pub flag_dapps_path: String, - pub flag_signer: bool, + pub flag_force_signer: bool, pub flag_no_signer: bool, pub flag_signer_port: u16, pub flag_signer_path: String, - pub flag_no_token: bool, pub flag_force_sealing: bool, pub flag_reseal_on_txs: String, pub flag_reseal_min_period: u64, diff --git a/parity/configuration.rs b/parity/configuration.rs index dfa135dd6..195f1e0c3 100644 --- a/parity/configuration.rs +++ b/parity/configuration.rs @@ -539,8 +539,8 @@ impl Configuration { } pub fn signer_enabled(&self) -> bool { - (self.args.cmd_ui && !self.args.flag_no_signer) || - (!self.args.cmd_ui && self.args.flag_signer) + (self.args.flag_unlock.is_none() && !self.args.flag_no_signer) || + self.args.flag_force_signer } } diff --git a/parity/main.rs b/parity/main.rs index d466987ef..841261dd0 100644 --- a/parity/main.rs +++ b/parity/main.rs @@ -193,13 +193,6 @@ fn execute_client(conf: Configuration, spec: Spec, client_config: ClientConfig) let net_settings = conf.net_settings(&spec); let sync_config = conf.sync_config(&spec); - // Create and display a new token for UIs. - if conf.signer_enabled() && !conf.args.flag_no_token { - new_token(conf.directories().signer).unwrap_or_else(|e| { - die!("Error generating token: {:?}", e) - }); - } - // Display warning about using unlock with signer if conf.signer_enabled() && conf.args.flag_unlock.is_some() { warn!("Using Trusted Signer and --unlock is not recommended!");