Skip to content

Commit

Permalink
Backport part of cosmos#1653
Browse files Browse the repository at this point in the history
  • Loading branch information
ulbqb committed Jul 27, 2023
1 parent 474535c commit 69b6922
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
4 changes: 3 additions & 1 deletion modules/core/03-connection/types/msgs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"github.com/Finschia/finschia-sdk/store/iavl"
"github.com/Finschia/finschia-sdk/store/rootmulti"
storetypes "github.com/Finschia/finschia-sdk/store/types"
"github.com/Finschia/ostracon/libs/log"
"github.com/stretchr/testify/suite"
abci "github.com/tendermint/tendermint/abci/types"
dbm "github.com/tendermint/tm-db"
Expand Down Expand Up @@ -46,7 +47,8 @@ func (suite *MsgTestSuite) SetupTest() {

app := simapp.Setup(false)
db := dbm.NewMemDB()
store := rootmulti.NewStore(db)
dblog := log.NewNopLogger()
store := rootmulti.NewStore(db, dblog)
storeKey := storetypes.NewKVStoreKey("iavlStoreKey")

store.MountStoreWithDB(storeKey, storetypes.StoreTypeIAVL, nil)
Expand Down
4 changes: 3 additions & 1 deletion modules/core/04-channel/types/msgs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"github.com/Finschia/finschia-sdk/store/rootmulti"
storetypes "github.com/Finschia/finschia-sdk/store/types"
sdk "github.com/Finschia/finschia-sdk/types"
"github.com/Finschia/ostracon/libs/log"
"github.com/stretchr/testify/suite"
abci "github.com/tendermint/tendermint/abci/types"
dbm "github.com/tendermint/tm-db"
Expand Down Expand Up @@ -77,7 +78,8 @@ type TypesTestSuite struct {
func (suite *TypesTestSuite) SetupTest() {
app := simapp.Setup(false)
db := dbm.NewMemDB()
store := rootmulti.NewStore(db)
dblog := log.NewNopLogger()
store := rootmulti.NewStore(db, dblog)
storeKey := storetypes.NewKVStoreKey("iavlStoreKey")

store.MountStoreWithDB(storeKey, storetypes.StoreTypeIAVL, nil)
Expand Down
4 changes: 3 additions & 1 deletion modules/core/23-commitment/types/commitment_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"github.com/Finschia/finschia-sdk/store/iavl"
"github.com/Finschia/finschia-sdk/store/rootmulti"
storetypes "github.com/Finschia/finschia-sdk/store/types"
"github.com/Finschia/ostracon/libs/log"
"github.com/stretchr/testify/suite"
dbm "github.com/tendermint/tm-db"
)
Expand All @@ -20,7 +21,8 @@ type MerkleTestSuite struct {

func (suite *MerkleTestSuite) SetupTest() {
db := dbm.NewMemDB()
suite.store = rootmulti.NewStore(db)
dblog := log.NewNopLogger()
suite.store = rootmulti.NewStore(db, dblog)

suite.storeKey = storetypes.NewKVStoreKey("iavlStoreKey")

Expand Down
3 changes: 0 additions & 3 deletions testing/simapp/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import (
"github.com/Finschia/finschia-sdk/baseapp"
"github.com/Finschia/finschia-sdk/client"
"github.com/Finschia/finschia-sdk/client/grpc/tmservice"
"github.com/Finschia/finschia-sdk/client/rpc"
"github.com/Finschia/finschia-sdk/codec"
"github.com/Finschia/finschia-sdk/codec/types"
"github.com/Finschia/finschia-sdk/server/api"
Expand Down Expand Up @@ -758,14 +757,12 @@ func (app *SimApp) SimulationManager() *module.SimulationManager {
// API server.
func (app *SimApp) RegisterAPIRoutes(apiSvr *api.Server, apiConfig config.APIConfig) {
clientCtx := apiSvr.ClientCtx
rpc.RegisterRoutes(clientCtx, apiSvr.Router)
// Register new tx routes from grpc-gateway.
authtx.RegisterGRPCGatewayRoutes(clientCtx, apiSvr.GRPCGatewayRouter)
// Register new tendermint queries routes from grpc-gateway.
tmservice.RegisterGRPCGatewayRoutes(clientCtx, apiSvr.GRPCGatewayRouter)

// Register legacy and grpc-gateway routes for all modules.
ModuleBasics.RegisterRESTRoutes(clientCtx, apiSvr.Router)
ModuleBasics.RegisterGRPCGatewayRoutes(clientCtx, apiSvr.GRPCGatewayRouter)

// register swagger API from root so that other applications can override easily
Expand Down

0 comments on commit 69b6922

Please sign in to comment.