Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
JulianToledano committed Jun 25, 2024
1 parent 6051619 commit c035d34
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 27 deletions.
3 changes: 1 addition & 2 deletions baseapp/abci_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ import (
"testing"
"time"

"github.com/cosmos/cosmos-sdk/codec"

abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
cmtprotocrypto "github.com/cometbft/cometbft/api/cometbft/crypto/v1"
cmtproto "github.com/cometbft/cometbft/api/cometbft/types/v1"
Expand All @@ -41,6 +39,7 @@ import (
"github.com/cosmos/cosmos-sdk/baseapp"
baseapptestutil "github.com/cosmos/cosmos-sdk/baseapp/testutil"
"github.com/cosmos/cosmos-sdk/baseapp/testutil/mock"
"github.com/cosmos/cosmos-sdk/codec"
cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec"
"github.com/cosmos/cosmos-sdk/testutil"
"github.com/cosmos/cosmos-sdk/testutil/testdata"
Expand Down
25 changes: 0 additions & 25 deletions baseapp/baseapp.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,9 @@ import (
cmtproto "github.com/cometbft/cometbft/api/cometbft/types/v1"
"github.com/cometbft/cometbft/crypto/tmhash"
dbm "github.com/cosmos/cosmos-db"
"github.com/cosmos/cosmos-proto/anyutil"
"github.com/cosmos/gogoproto/proto"
"golang.org/x/exp/maps"
protov2 "google.golang.org/protobuf/proto"
"google.golang.org/protobuf/reflect/protoreflect"
"google.golang.org/protobuf/types/known/anypb"

"cosmossdk.io/core/header"
"cosmossdk.io/core/log"
Expand Down Expand Up @@ -1122,28 +1119,6 @@ func (app *BaseApp) simulateNestedMessages(ctx sdk.Context, msg sdk.Msg) error {
return err
}

// msgsV1ToMsgsV2 transforms v1 messages into v2.
func (app *BaseApp) msgsV1ToMsgsV2(msgs []sdk.Msg) ([]protov2.Message, error) {
msgsV2 := make([]protov2.Message, len(msgs))
for i, msg := range msgs {
gogoAny, err := codectypes.NewAnyWithValue(msg)
if err != nil {
return nil, err
}
anyMsg := &anypb.Any{
TypeUrl: gogoAny.TypeUrl,
Value: gogoAny.Value,
}
msgV2, err := anyutil.Unpack(anyMsg, app.cdc.InterfaceRegistry().SigningContext().FileResolver(), app.cdc.InterfaceRegistry().SigningContext().TypeResolver())
if err != nil {
return nil, err
}
msgsV2[i] = msgV2
}

return msgsV2, nil
}

// makeABCIData generates the Data field to be sent to ABCI Check/DeliverTx.
func makeABCIData(msgResponses []*codectypes.Any) ([]byte, error) {
return proto.Marshal(&sdk.TxMsgData{MsgResponses: msgResponses})
Expand Down

0 comments on commit c035d34

Please sign in to comment.