forgot to wrap these two errors (#3156)

This commit is contained in:
terence tsao 2019-08-08 06:55:25 -07:00 committed by GitHub
parent ccc7d8d7b7
commit 2ec8a46cb2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -51,7 +51,7 @@ func NewValidatorAccount(directory string, password string) error {
}
shardWithdrawalKeyFile = shardWithdrawalKeyFile + hex.EncodeToString(shardWithdrawalKey.PublicKey.Marshal())[:12]
if err := ks.StoreKey(shardWithdrawalKeyFile, shardWithdrawalKey, password); err != nil {
return fmt.Errorf("unable to store key %v", err)
return errors.Wrap(err, "unable to store key %v")
}
log.WithField(
"path",
@ -63,7 +63,7 @@ func NewValidatorAccount(directory string, password string) error {
}
validatorKeyFile = validatorKeyFile + hex.EncodeToString(validatorKey.PublicKey.Marshal())[:12]
if err := ks.StoreKey(validatorKeyFile, validatorKey, password); err != nil {
return fmt.Errorf("unable to store key %v", err)
return errors.Wrap(err,"unable to store key %v")
}
log.WithField(
"path",