Skip to content

Commit

Permalink
chore:fix export function name (#6249)
Browse files Browse the repository at this point in the history
* chore:fix export function name

* perf(light-clients):use errors.New to replace fmt.Errorf with no parameters
  • Loading branch information
seay404 committed May 2, 2024
1 parent cf68eed commit 95bacce
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion modules/apps/29-fee/keeper/keeper.go
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ func (k Keeper) GetAllForwardRelayerAddresses(ctx sdk.Context) []types.ForwardRe
return forwardRelayerAddr
}

// Deletes the forwardRelayerAddr associated with the packetID
// DeleteForwardRelayerAddress deletes the forwardRelayerAddr associated with the packetID
func (k Keeper) DeleteForwardRelayerAddress(ctx sdk.Context, packetID channeltypes.PacketId) {
store := ctx.KVStore(k.storeKey)
key := types.KeyRelayerAddressForAsyncAck(packetID)
Expand Down
2 changes: 1 addition & 1 deletion modules/apps/transfer/client/cli/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ func GetCmdParams() *cobra.Command {
return cmd
}

// GetCmdParams returns the command handler for ibc-transfer parameter querying.
// GetCmdQueryEscrowAddress returns the command handler for ibc-transfer parameter querying.
func GetCmdQueryEscrowAddress() *cobra.Command {
cmd := &cobra.Command{
Use: "escrow-address",
Expand Down
2 changes: 1 addition & 1 deletion modules/core/ante/ante.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ func NewRedundantRelayDecorator(k *keeper.Keeper) RedundantRelayDecorator {
return RedundantRelayDecorator{k: k}
}

// RedundantRelayDecorator returns an error if a multiMsg tx only contains packet messages (Recv, Ack, Timeout) and additional update messages
// AnteHandle returns an error if a multiMsg tx only contains packet messages (Recv, Ack, Timeout) and additional update messages
// and all packet messages are redundant. If the transaction is just a single UpdateClient message, or the multimsg transaction
// contains some other message type, then the antedecorator returns no error and continues processing to ensure these transactions
// are included. This will ensure that relayers do not waste fees on multiMsg transactions when another relayer has already submitted
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ var tempDir = func() string {
// Ref: https://github.com/cosmos/ibc-go/issues/4821#issuecomment-1747240445
func CheckLibwasmVersion(wasmExpectedVersion string) error {
if wasmExpectedVersion == "" {
return fmt.Errorf("wasmvm module not exist")
return errors.New("wasmvm module not exist")
}
wasmVersion, err := wasmvm.LibwasmvmVersion()
if err != nil {
Expand Down
6 changes: 3 additions & 3 deletions modules/light-clients/08-wasm/types/consensus_host.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package types

import (
"fmt"
"errors"

errorsmod "cosmossdk.io/errors"

Expand All @@ -23,11 +23,11 @@ var _ clienttypes.ConsensusHost = (*WasmConsensusHost)(nil)
// NewWasmConsensusHost creates and returns a new ConsensusHost for wasm wrapped consensus client state and consensus state self validation.
func NewWasmConsensusHost(cdc codec.BinaryCodec, delegate clienttypes.ConsensusHost) (*WasmConsensusHost, error) {
if cdc == nil {
return nil, fmt.Errorf("wasm consensus host codec is nil")
return nil, errors.New("wasm consensus host codec is nil")
}

if delegate == nil {
return nil, fmt.Errorf("wasm delegate consensus host is nil")
return nil, errors.New("wasm delegate consensus host is nil")
}

return &WasmConsensusHost{
Expand Down

0 comments on commit 95bacce

Please sign in to comment.