Fix validator creation path (#6271)

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
This commit is contained in:
Ivan Martinez 2020-06-15 15:27:45 -04:00 committed by GitHub
parent e59ee2f203
commit bf548d1670
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 0 deletions

View File

@ -215,6 +215,9 @@ func HandleEmptyKeystoreFlags(cliCtx *cli.Context, confirmPassword bool) (string
if text = strings.Replace(text, "\n", "", -1); text != "" {
path = text
}
if text = strings.Replace(text, "\r", "", -1); text != "" {
path = text
}
}
if passphrase == "" {

View File

@ -125,6 +125,7 @@ contract in order to activate the validator client`,
keystorePath, passphrase, err := accounts.HandleEmptyKeystoreFlags(cliCtx, true /*confirmPassword*/)
if err != nil {
log.WithError(err).Error("Could not list keys")
return nil
}
if _, _, err := accounts.CreateValidatorAccount(keystorePath, passphrase); err != nil {
log.WithField("err", err.Error()).Fatalf("Could not create validator at path: %s", keystorePath)