mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-01-09 15:37:56 -05:00
Integrate Accounts v2 Keymanager Into Validator Client (#6489)
* add in configs * ask for enable accounts v2 * begin integration of v2 keymanager * refactor wallet opening * include significant refactoring of how opening a wallet works, making it easy to include at runtime * ensure build with keymanager v2 * further improving runtime integration * default pass paths * finally running v2 at runtime * import spacing * Merge branch 'master' into v2-accounts-feature * Merge refs/heads/master into v2-accounts-feature * Merge refs/heads/master into v2-accounts-feature * Merge refs/heads/master into v2-accounts-feature * Merge refs/heads/master into v2-accounts-feature * confs * rem e2e val flag * Merge branch 'master' into v2-accounts-feature * Merge refs/heads/master into v2-accounts-feature * Merge refs/heads/master into v2-accounts-feature * Merge refs/heads/master into v2-accounts-feature * Merge refs/heads/master into v2-accounts-feature * Merge refs/heads/master into v2-accounts-feature * Merge refs/heads/master into v2-accounts-feature
This commit is contained in:
@@ -47,7 +47,7 @@ func NewKeystore(input string) (KeyManager, string, error) {
|
||||
if opts.Path == "" {
|
||||
opts.Path = v1.DefaultValidatorDir()
|
||||
}
|
||||
log.WithField("keystorePath", opts.Path).Info("Checking validator keys")
|
||||
log.WithField("keystorePath", opts.Path).Debug("Checking validator keys")
|
||||
|
||||
exists, err := v1.Exists(opts.Path, true /* assertNonEmpty */)
|
||||
if err != nil {
|
||||
|
||||
@@ -46,3 +46,17 @@ func (k Kind) String() string {
|
||||
return fmt.Sprintf("%d", int(k))
|
||||
}
|
||||
}
|
||||
|
||||
// ParseKind from a raw string, returning a keymanager kind.
|
||||
func ParseKind(k string) (Kind, error) {
|
||||
switch k {
|
||||
case "direct":
|
||||
return Direct, nil
|
||||
case "derived":
|
||||
return Derived, nil
|
||||
case "remote":
|
||||
return Remote, nil
|
||||
default:
|
||||
return 0, fmt.Errorf("%s is not an allowed keymanager", k)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user