diff --git a/cmd/tendermint/commands/init.go b/cmd/tendermint/commands/init.go index 4c62d6518..c02725717 100644 --- a/cmd/tendermint/commands/init.go +++ b/cmd/tendermint/commands/init.go @@ -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(), diff --git a/cmd/tendermint/commands/testnet.go b/cmd/tendermint/commands/testnet.go index e5fce778f..c39ebf796 100644 --- a/cmd/tendermint/commands/testnet.go +++ b/cmd/tendermint/commands/testnet.go @@ -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(),