Skip to content

Commit 3e24e10

Browse files
committed
add error handling for indexer
1 parent d094f14 commit 3e24e10

File tree

3 files changed

+6
-11
lines changed

3 files changed

+6
-11
lines changed

app/app.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,6 @@ func NewMinitiaApp(
291291
app.SetEndBlocker(app.EndBlocker)
292292

293293
// setup BlockSDK
294-
295294
mempool, anteHandler, checkTx, prepareProposalHandler, processProposalHandler, err := setupBlockSDK(app, mempoolMaxTxs, wasmConfig, app.GetKVStoreKey()[wasmtypes.StoreKey])
296295
if err != nil {
297296
tmos.Exit(err.Error())

app/indexer.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ func setupIndexer(
2929
}
3030
kvIndexerKeeper := kvindexerkeeper.NewKeeper(
3131
app.appCodec,
32-
"move",
32+
"wasm",
3333
kvindexerDB,
3434
kvindexerConfig,
3535
app.ac,
@@ -60,7 +60,9 @@ func setupIndexer(
6060
// Add your implementation here
6161

6262
kvIndexer, err := kvindexer.NewIndexer(app.GetBaseApp().Logger(), kvIndexerKeeper)
63-
if err != nil || kvIndexer == nil {
63+
if err != nil {
64+
return nil, nil, nil, err
65+
} else if kvIndexer == nil {
6466
return nil, nil, nil, nil
6567
}
6668

app/keepers/keys.go

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
package keepers
22

33
import (
4+
// cosmos mod imports
45
storetypes "cosmossdk.io/store/types"
56
"cosmossdk.io/x/feegrant"
67
upgradetypes "cosmossdk.io/x/upgrade/types"
78

9+
// cosmos imports
810
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
911
authzkeeper "github.com/cosmos/cosmos-sdk/x/authz/keeper"
1012
banktypes "github.com/cosmos/cosmos-sdk/x/bank/types"
@@ -13,7 +15,6 @@ import (
1315
"github.com/cosmos/cosmos-sdk/x/group"
1416

1517
// ibc imports
16-
1718
packetforwardtypes "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v8/packetforward/types"
1819
ratelimittypes "github.com/cosmos/ibc-apps/modules/rate-limiting/v8/types"
1920
capabilitytypes "github.com/cosmos/ibc-go/modules/capability/types"
@@ -24,32 +25,25 @@ import (
2425
ibcexported "github.com/cosmos/ibc-go/v8/modules/core/exported"
2526

2627
// initia imports
27-
2828
ibchookstypes "github.com/initia-labs/initia/x/ibc-hooks/types"
2929
icaauthtypes "github.com/initia-labs/initia/x/intertx/types"
3030

3131
// OPinit imports
32-
3332
opchildtypes "github.com/initia-labs/OPinit/x/opchild/types"
3433

3534
// skip imports
36-
3735
auctiontypes "github.com/skip-mev/block-sdk/v2/x/auction/types"
3836
marketmaptypes "github.com/skip-mev/slinky/x/marketmap/types"
3937
oracletypes "github.com/skip-mev/slinky/x/oracle/types"
4038

4139
// CosmWasm imports
42-
4340
wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types"
4441

4542
// local imports
46-
4743
tokenfactorytypes "github.com/initia-labs/miniwasm/x/tokenfactory/types"
4844

4945
// noble forwarding keeper
50-
5146
forwardingtypes "github.com/noble-assets/forwarding/v2/x/forwarding/types"
52-
// kvindexer
5347
)
5448

5549
func (appKeepers *AppKeepers) GenerateKeys() {

0 commit comments

Comments
 (0)