mirror of
https://github.com/tendermint/tendermint.git
synced 2026-07-30 03:52:50 +00:00
Review comments: wrap errors
This commit is contained in:
@@ -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(),
|
||||
|
||||
@@ -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(),
|
||||
|
||||
Reference in New Issue
Block a user