Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Commit

Permalink
fix password loading
Browse files Browse the repository at this point in the history
  • Loading branch information
keorn committed Dec 6, 2016
1 parent 0a2ec31 commit b089aa7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions parity/run.rs
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ pub fn execute(cmd: RunCmd, logger: Arc<RotatingLogger>) -> Result<(), String> {
miner.set_extra_data(cmd.miner_extras.extra_data);
miner.set_transactions_limit(cmd.miner_extras.transactions_limit);
let engine_signer = cmd.miner_extras.engine_signer;
if passwords.into_iter().any(|p| miner.set_engine_signer(engine_signer, p).is_ok()) {
if !passwords.into_iter().any(|p| miner.set_engine_signer(engine_signer, p).is_ok()) {
return Err(format!("No password found for the consensus signer {}. Make sure valid password is present in files passed using `--password`.", cmd.miner_extras.engine_signer));
}

Expand Down Expand Up @@ -440,7 +440,7 @@ fn prepare_account_provider(dirs: &Directories, cfg: AccountsConfig, passwords:
));

for a in cfg.unlocked_accounts {
if passwords.iter().any(|p| account_service.unlock_account_permanently(a, (*p).clone()).is_ok()) {
if !passwords.iter().any(|p| account_service.unlock_account_permanently(a, (*p).clone()).is_ok()) {
return Err(format!("No password found to unlock account {}. Make sure valid password is present in files passed using `--password`.", a));
}
}
Expand Down

0 comments on commit b089aa7

Please sign in to comment.