Allow keystore without path.

This commit is contained in:
Jim McDonald
2023-02-27 11:16:36 +00:00
parent 793a8d6d79
commit 7087a0a55c
3 changed files with 10 additions and 3 deletions

View File

@@ -1,4 +1,4 @@
dev:
1.28.4:
- allow validator exit to use a keystore as its validator parameter
1.28.2:

View File

@@ -24,7 +24,7 @@ import (
// ReleaseVersion is the release version of the codebase.
// Usually overridden by tag names when building binaries.
var ReleaseVersion = "local build (latest release 1.28.3)"
var ReleaseVersion = "local build (latest release 1.28.4)"
// versionCmd represents the version command.
var versionCmd = &cobra.Command{

View File

@@ -65,7 +65,14 @@ func ParseAccount(ctx context.Context,
return parseAccountFromMnemonic(ctx, accountStr, supplementary, unlock)
default:
// This could be the path to a keystore.
return nil, fmt.Errorf("unknown account specifier %s", accountStr)
if _, err := os.Stat(accountStr); err != nil {
return nil, fmt.Errorf("unknown account specifier %s", accountStr)
}
account, err := parseAccountFromKeystorePath(ctx, accountStr, supplementary, unlock)
if err != nil {
return nil, err
}
return account, nil
}
}