Merge PR #3557: Removing pkg/errors when not necessary
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
package context
|
||||
|
||||
import (
|
||||
"github.com/pkg/errors"
|
||||
"fmt"
|
||||
|
||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
)
|
||||
@@ -39,11 +39,11 @@ func (ctx CLIContext) BroadcastTxAndAwaitCommit(tx []byte) (sdk.TxResponse, erro
|
||||
}
|
||||
|
||||
if !res.CheckTx.IsOK() {
|
||||
return sdk.NewResponseFormatBroadcastTxCommit(res), errors.Errorf(res.CheckTx.Log)
|
||||
return sdk.NewResponseFormatBroadcastTxCommit(res), fmt.Errorf(res.CheckTx.Log)
|
||||
}
|
||||
|
||||
if !res.DeliverTx.IsOK() {
|
||||
return sdk.NewResponseFormatBroadcastTxCommit(res), errors.Errorf(res.DeliverTx.Log)
|
||||
return sdk.NewResponseFormatBroadcastTxCommit(res), fmt.Errorf(res.DeliverTx.Log)
|
||||
}
|
||||
|
||||
return sdk.NewResponseFormatBroadcastTxCommit(res), err
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package context
|
||||
|
||||
import (
|
||||
"github.com/pkg/errors"
|
||||
"fmt"
|
||||
|
||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
)
|
||||
@@ -9,7 +9,7 @@ import (
|
||||
// ErrInvalidAccount returns a standardized error reflecting that a given
|
||||
// account address does not exist.
|
||||
func ErrInvalidAccount(addr sdk.AccAddress) error {
|
||||
return errors.Errorf(`No account with address %s was found in the state.
|
||||
return fmt.Errorf(`No account with address %s was found in the state.
|
||||
Are you sure there has been a transaction involving it?`, addr)
|
||||
}
|
||||
|
||||
@@ -17,6 +17,6 @@ Are you sure there has been a transaction involving it?`, addr)
|
||||
// height can't be verified. The reason is that the base checkpoint of the certifier is
|
||||
// newer than the given height
|
||||
func ErrVerifyCommit(height int64) error {
|
||||
return errors.Errorf(`The height of base truststore in gaia-lite is higher than height %d.
|
||||
return fmt.Errorf(`The height of base truststore in gaia-lite is higher than height %d.
|
||||
Can't verify blockchain proof at this height. Please set --trust-node to true and try again`, height)
|
||||
}
|
||||
|
||||
@@ -164,7 +164,7 @@ func (ctx CLIContext) query(path string, key cmn.HexBytes) (res []byte, err erro
|
||||
|
||||
resp := result.Response
|
||||
if !resp.IsOK() {
|
||||
return res, errors.Errorf(resp.Log)
|
||||
return res, errors.New(resp.Log)
|
||||
}
|
||||
|
||||
// data from trusted node or subspace query doesn't need verification
|
||||
|
||||
Reference in New Issue
Block a user