Cosmetic fixes

This commit is contained in:
Zahary Karadjov 2020-08-02 21:47:15 +03:00 committed by zah
parent c882b7c2f3
commit be2c2e27f3
2 changed files with 10 additions and 5 deletions

View File

@ -1238,7 +1238,7 @@ programMain:
let depositDataPath = if config.outDepositsFile.isSome:
config.outDepositsFile.get.string
else:
config.outValidatorsDir / "deposit_data-" & $epochTime()
config.outValidatorsDir / "deposit_data-" & $epochTime() & ".json"
let launchPadDeposits =
mapIt(deposits.value, LaunchPadDeposit.init(config.runtimePreset, it))

View File

@ -95,7 +95,8 @@ iterator validatorKeys*(conf: BeaconNodeConf|ValidatorClientConf): ValidatorPriv
type
KeystoreGenerationError = enum
RandomSourceDepleted,
FailedToCreateValidatoDir
FailedToCreateValidatorDir
FailedToCreateSecretsDir
FailedToCreateSecretFile
FailedToCreateKeystoreFile
@ -117,7 +118,10 @@ proc saveKeystore(rng: var BrHmacDrbgContext,
keystoreFile = validatorDir / keystoreFileName
try: createDir validatorDir
except OSError, IOError: return err FailedToCreateValidatoDir
except OSError, IOError: return err FailedToCreateValidatorDir
try: createDir secretsDir
except OSError, IOError: return err FailedToCreateSecretsDir
try: writeFile(secretsDir / keyName, password.string)
except IOError: return err FailedToCreateSecretFile
@ -238,8 +242,9 @@ proc importKeystoresFromDir*(rng: var BrHmacDrbgContext,
if secret.len == 0:
if firstDecryptionAttempt:
try:
echo "Please enter the password for decrypting '$1' " &
"or press ENTER to skip importing this keystore" % [file]
const msg = "Please enter the password for decrypting '$1' " &
"or press ENTER to skip importing this keystore"
echo msg % [file]
except ValueError:
raiseAssert "The format string above is correct"
else: