From 358bebb05c5d8498514ddb905edc78ec3a7517f9 Mon Sep 17 00:00:00 2001 From: Hieu Vu Date: Thu, 5 Dec 2024 17:06:40 +0700 Subject: [PATCH] lint --- server/v2/cometbft/abci_test.go | 8 ++++---- server/v2/cometbft/utils.go | 1 - 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/server/v2/cometbft/abci_test.go b/server/v2/cometbft/abci_test.go index 44cad92b1c2b..cfc649884660 100644 --- a/server/v2/cometbft/abci_test.go +++ b/server/v2/cometbft/abci_test.go @@ -6,6 +6,7 @@ import ( "encoding/json" "errors" "io" + "reflect" "strings" "sync" "testing" @@ -15,11 +16,10 @@ import ( abciproto "github.com/cometbft/cometbft/api/cometbft/abci/v1" v1 "github.com/cometbft/cometbft/api/cometbft/types/v1" "github.com/cosmos/gogoproto/proto" + gogoproto "github.com/cosmos/gogoproto/proto" gogotypes "github.com/cosmos/gogoproto/types" "github.com/stretchr/testify/require" - "reflect" - appmodulev2 "cosmossdk.io/core/appmodule/v2" "cosmossdk.io/core/server" "cosmossdk.io/core/store" @@ -35,9 +35,9 @@ import ( "cosmossdk.io/server/v2/stf/branch" "cosmossdk.io/server/v2/stf/mock" consensustypes "cosmossdk.io/x/consensus/types" + "github.com/cosmos/cosmos-sdk/testutil/testdata" sdk "github.com/cosmos/cosmos-sdk/types" - gogoproto "github.com/cosmos/gogoproto/proto" ) var ( @@ -810,7 +810,7 @@ func setUpConsensus(t *testing.T, gasLimit uint64, mempool mempool.Mempool[mock. }, nil }) - var helloFooHandler = func(ctx context.Context, msg transaction.Msg) (msgResp transaction.Msg, err error) { + helloFooHandler := func(ctx context.Context, msg transaction.Msg) (msgResp transaction.Msg, err error) { typedReq := msg.(*testdata.SayHelloRequest) handler := testdata.QueryImpl{} typedResp, err := handler.SayHello(ctx, typedReq) diff --git a/server/v2/cometbft/utils.go b/server/v2/cometbft/utils.go index d6bb9de54fe9..81d47b7f8cb8 100644 --- a/server/v2/cometbft/utils.go +++ b/server/v2/cometbft/utils.go @@ -289,7 +289,6 @@ func gRPCErrorToSDKError(err error) *abci.QueryResponse { res.Log = err.Error() } return res - } status, ok := grpcstatus.FromError(err)