@@ -67,10 +67,6 @@ import (
6767 "github.com/initia-labs/miniwasm/app/keepers"
6868 "github.com/initia-labs/miniwasm/app/upgrades/v1_1_1"
6969
70- // kvindexer
71- kvindexermodule "github.com/initia-labs/kvindexer/x/kvindexer"
72- kvindexerkeeper "github.com/initia-labs/kvindexer/x/kvindexer/keeper"
73-
7470 // unnamed import of statik for swagger UI support
7571 _ "github.com/initia-labs/miniwasm/client/docs/statik"
7672)
@@ -117,18 +113,12 @@ type MinitiaApp struct {
117113
118114 // Override of BaseApp's CheckTx
119115 checkTxHandler blockchecktx.CheckTx
120-
121- // indexer keeper for graceful shutdown
122- kvIndexerKeeper * kvindexerkeeper.Keeper
123- // indexer module for grpc-gateway registration
124- kvIndexerModule * kvindexermodule.AppModuleBasic
125116}
126117
127118// NewMinitiaApp returns a reference to an initialized Initia.
128119func NewMinitiaApp (
129120 logger log.Logger ,
130121 db dbm.DB ,
131- kvindexerDB dbm.DB ,
132122 traceStore io.Writer ,
133123 loadLatest bool ,
134124 wasmOpts []wasmkeeper.Option ,
@@ -247,17 +237,6 @@ func NewMinitiaApp(
247237 tmos .Exit (err .Error ())
248238 }
249239
250- // setup indexer
251- if kvIndexerKeeper , kvIndexerModule , streamingManager , err := setupIndexer (app , appOpts , encodingConfig , kvindexerDB ); err != nil {
252- tmos .Exit (err .Error ())
253- } else if kvIndexerKeeper != nil && kvIndexerModule != nil && streamingManager != nil {
254- // register kvindexer keeper and module, and register services
255- app .SetKVIndexer (kvIndexerKeeper , kvIndexerModule )
256-
257- // override base-app's streaming manager
258- app .SetStreamingManager (* streamingManager )
259- }
260-
261240 // Only register upgrade handlers when loading the latest version of the app.
262241 // This optimization skips unnecessary handler registration during app initialization.
263242 //
@@ -392,13 +371,6 @@ func (app *MinitiaApp) setPostHandler() {
392371 app .SetPostHandler (postHandler )
393372}
394373
395- // SetKVIndexer sets the kvindexer keeper and module for the app and registers the services.
396- func (app * MinitiaApp ) SetKVIndexer (kvIndexerKeeper * kvindexerkeeper.Keeper , kvIndexerModule * kvindexermodule.AppModuleBasic ) {
397- app .kvIndexerKeeper = kvIndexerKeeper
398- app .kvIndexerModule = kvIndexerModule
399- app .kvIndexerModule .RegisterServices (app .configurator )
400- }
401-
402374// Name returns the name of the App
403375func (app * MinitiaApp ) Name () string { return app .BaseApp .Name () }
404376
@@ -500,11 +472,6 @@ func (app *MinitiaApp) RegisterAPIRoutes(apiSvr *api.Server, apiConfig config.AP
500472 // Register grpc-gateway routes for all modules.
501473 app .BasicModuleManager .RegisterGRPCGatewayRoutes (clientCtx , apiSvr .GRPCGatewayRouter )
502474
503- // Register grpc-gateway routes for indexer module.
504- if app .kvIndexerModule != nil {
505- app .kvIndexerModule .RegisterGRPCGatewayRoutes (clientCtx , apiSvr .GRPCGatewayRouter )
506- }
507-
508475 // register swagger API from root so that other applications can override easily
509476 if apiConfig .Swagger {
510477 RegisterSwaggerAPI (apiSvr .Router )
@@ -570,12 +537,6 @@ func GetMaccPerms() map[string][]string {
570537// Close closes the underlying baseapp, the oracle service, and the prometheus server if required.
571538// This method blocks on the closure of both the prometheus server, and the oracle-service
572539func (app * MinitiaApp ) Close () error {
573- if app .kvIndexerKeeper != nil {
574- if err := app .kvIndexerKeeper .Close (); err != nil {
575- return err
576- }
577- }
578-
579540 if err := app .BaseApp .Close (); err != nil {
580541 return err
581542 }
0 commit comments