Implement #2067
This commit is contained in:
parent
7e4fd325b5
commit
ae19ab72c0
|
@ -360,7 +360,7 @@ type
|
|||
of DepositsCmd.`import`:
|
||||
importedDepositsDir* {.
|
||||
argument
|
||||
desc: "A directory with keystores to import" }: InputDir
|
||||
desc: "A directory with keystores to import" }: Option[InputDir]
|
||||
|
||||
of DepositsCmd.status:
|
||||
discard
|
||||
|
|
|
@ -1288,9 +1288,20 @@ programMain:
|
|||
quit 1
|
||||
|
||||
of DepositsCmd.`import`:
|
||||
let validatorKeysDir = config.importedDepositsDir.get:
|
||||
let cwd = os.getCurrentDir()
|
||||
if dirExists(cwd / "validator_keys"):
|
||||
InputDir(cwd / "validator_keys")
|
||||
else:
|
||||
echo "The default search path for validator keys is a sub-directory " &
|
||||
"named 'validator_keys' in the current working directory. Since " &
|
||||
"no such directory exists, please either provide the correct path" &
|
||||
"as an argument or copy the imported keys in the expected location."
|
||||
quit 1
|
||||
|
||||
importKeystoresFromDir(
|
||||
rng[],
|
||||
config.importedDepositsDir.string,
|
||||
validatorKeysDir.string,
|
||||
config.validatorsDir, config.secretsDir)
|
||||
|
||||
of DepositsCmd.status:
|
||||
|
|
Loading…
Reference in New Issue