From 95bacce19e6bcbf1b177466a0d5ab83e0bb3d191 Mon Sep 17 00:00:00 2001 From: seayyyy <163325936+seay404@users.noreply.github.com> Date: Thu, 2 May 2024 19:52:31 +0800 Subject: [PATCH] chore:fix export function name (#6249) * chore:fix export function name * perf(light-clients):use errors.New to replace fmt.Errorf with no parameters --- modules/apps/29-fee/keeper/keeper.go | 2 +- modules/apps/transfer/client/cli/query.go | 2 +- modules/core/ante/ante.go | 2 +- .../light-clients/08-wasm/testing/simapp/simd/cmd/root.go | 2 +- modules/light-clients/08-wasm/types/consensus_host.go | 6 +++--- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/modules/apps/29-fee/keeper/keeper.go b/modules/apps/29-fee/keeper/keeper.go index f57a7155c69..b9316d8e001 100644 --- a/modules/apps/29-fee/keeper/keeper.go +++ b/modules/apps/29-fee/keeper/keeper.go @@ -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) diff --git a/modules/apps/transfer/client/cli/query.go b/modules/apps/transfer/client/cli/query.go index 20faa97cdb3..0e07febe833 100644 --- a/modules/apps/transfer/client/cli/query.go +++ b/modules/apps/transfer/client/cli/query.go @@ -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", diff --git a/modules/core/ante/ante.go b/modules/core/ante/ante.go index a64a5f0146a..6ab7e63d26e 100644 --- a/modules/core/ante/ante.go +++ b/modules/core/ante/ante.go @@ -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 diff --git a/modules/light-clients/08-wasm/testing/simapp/simd/cmd/root.go b/modules/light-clients/08-wasm/testing/simapp/simd/cmd/root.go index 58d433f30ce..c7e3ac5a1bf 100644 --- a/modules/light-clients/08-wasm/testing/simapp/simd/cmd/root.go +++ b/modules/light-clients/08-wasm/testing/simapp/simd/cmd/root.go @@ -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 { diff --git a/modules/light-clients/08-wasm/types/consensus_host.go b/modules/light-clients/08-wasm/types/consensus_host.go index fde71695656..c696190afe6 100644 --- a/modules/light-clients/08-wasm/types/consensus_host.go +++ b/modules/light-clients/08-wasm/types/consensus_host.go @@ -1,7 +1,7 @@ package types import ( - "fmt" + "errors" errorsmod "cosmossdk.io/errors" @@ -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{