mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-01-09 15:37:56 -05:00
Use validator protection datadir (#7355)
* Add validator protection db flag * fix nil handling * reuse datadir * add datadir default config * Add handling for moving account dir datafile to new set dir * naming conditionals * add tests * fix test * fix logic to default to wallet dir * raul feedback * nishant feedback * gaz * revert site_data changes * fix formatting * fix formatting Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com> Co-authored-by: Nishant Das <nishdas93@gmail.com> Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
This commit is contained in:
@@ -62,6 +62,19 @@ func InputDirectory(cliCtx *cli.Context, promptText string, flag *cli.StringFlag
|
||||
return fileutil.ExpandPath(inputtedDir)
|
||||
}
|
||||
|
||||
// InputDir from the cli without exception.
|
||||
func InputDir(cliCtx *cli.Context, promptText string, dirFlag *cli.StringFlag) (string, error) {
|
||||
directory := cliCtx.String(dirFlag.Name)
|
||||
inputtedDir, err := promptutil.DefaultPrompt(au.Bold(promptText).String(), directory)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
if inputtedDir == directory {
|
||||
return directory, nil
|
||||
}
|
||||
return fileutil.ExpandPath(inputtedDir)
|
||||
}
|
||||
|
||||
// InputRemoteKeymanagerConfig via the cli.
|
||||
func InputRemoteKeymanagerConfig(cliCtx *cli.Context) (*remote.KeymanagerOpts, error) {
|
||||
addr := cliCtx.String(flags.GrpcRemoteAddressFlag.Name)
|
||||
|
||||
Reference in New Issue
Block a user