Review comments: wrap errors

This commit is contained in:
Ismail Khoffi
2018-12-01 12:08:57 +01:00
parent 1c6ed0e7d0
commit 977a138b1f
2 changed files with 4 additions and 2 deletions
+2 -1
View File
@@ -3,6 +3,7 @@ package commands
import (
"fmt"
"github.com/pkg/errors"
"github.com/spf13/cobra"
cfg "github.com/tendermint/tendermint/config"
@@ -59,7 +60,7 @@ func initFilesWithConfig(config *cfg.Config) error {
}
key, err := pv.GetPubKey()
if err != nil {
return err
return errors.Wrap(err, "failed to get pubkey from private validator")
}
genDoc.Validators = []types.GenesisValidator{{
Address: key.Address(),
+2 -1
View File
@@ -7,6 +7,7 @@ import (
"path/filepath"
"strings"
"github.com/pkg/errors"
"github.com/spf13/cobra"
cfg "github.com/tendermint/tendermint/config"
@@ -92,7 +93,7 @@ func testnetFiles(cmd *cobra.Command, args []string) error {
pv := privval.LoadFilePV(pvFile)
pubKey, err := pv.GetPubKey()
if err != nil {
return err
return errors.Wrap(err, "failed to get pubkey from private validator")
}
genVals[i] = types.GenesisValidator{
Address: pubKey.Address(),