@@ -27,6 +27,7 @@ import (
27
27
banktypes "github.com/cosmos/cosmos-sdk/x/bank/types"
28
28
consensusparamkeeper "github.com/cosmos/cosmos-sdk/x/consensus/keeper"
29
29
consensusparamtypes "github.com/cosmos/cosmos-sdk/x/consensus/types"
30
+ crisiskeeper "github.com/cosmos/cosmos-sdk/x/crisis/keeper"
30
31
crisistypes "github.com/cosmos/cosmos-sdk/x/crisis/types"
31
32
distrkeeper "github.com/cosmos/cosmos-sdk/x/distribution/keeper"
32
33
distrtypes "github.com/cosmos/cosmos-sdk/x/distribution/types"
@@ -98,7 +99,8 @@ type AppKeepers struct {
98
99
Distr distrkeeper.Keeper
99
100
Gov * govkeeper.Keeper
100
101
Upgrade * upgradekeeper.Keeper
101
- Params paramskeeper.Keeper //nolint: staticcheck
102
+ Crisis * crisiskeeper.Keeper //nolint: staticcheck
103
+ Params paramskeeper.Keeper //nolint: staticcheck
102
104
ConsensusParams * consensusparamkeeper.Keeper
103
105
IBC * ibckeeper.Keeper
104
106
Evidence * evidencekeeper.Keeper
@@ -195,7 +197,7 @@ func (app *App) InitSpecialKeepers(
195
197
cdc codec.Codec ,
196
198
legacyAmino * codec.LegacyAmino ,
197
199
bApp * baseapp.BaseApp ,
198
- _ uint ,
200
+ invCheckPeriod uint ,
199
201
skipUpgradeHeights map [int64 ]bool ,
200
202
homePath string ) {
201
203
@@ -236,14 +238,14 @@ func (app *App) InitSpecialKeepers(
236
238
// any further modules from creating scoped sub-keepers.
237
239
app .Keepers .Cosmos .Cap .Seal ()
238
240
239
- // app.Keepers.Cosmos.Crisis = crisiskeeper.NewKeeper(
240
- // cdc, runtime.NewKVStoreService(app.keys[crisistypes.StoreKey]),
241
- // invCheckPeriod,
242
- // app.Keepers.Cosmos.Bank,
243
- // authtypes.FeeCollectorName,
244
- // authtypes.NewModuleAddress(govtypes.ModuleName).String(),
245
- // addresscodec.NewBech32Codec(sdk.GetConfig().GetBech32AccountAddrPrefix()),
246
- // )
241
+ app .Keepers .Cosmos .Crisis = crisiskeeper .NewKeeper ( //nolint: staticcheck
242
+ cdc , runtime .NewKVStoreService (app .keys [crisistypes .StoreKey ]),
243
+ invCheckPeriod ,
244
+ app .Keepers .Cosmos .Bank ,
245
+ authtypes .FeeCollectorName ,
246
+ authtypes .NewModuleAddress (govtypes .ModuleName ).String (),
247
+ addresscodec .NewBech32Codec (sdk .GetConfig ().GetBech32AccountAddrPrefix ()),
248
+ )
247
249
248
250
app .Keepers .Cosmos .Upgrade = upgradekeeper .NewKeeper (
249
251
skipUpgradeHeights ,
@@ -574,14 +576,14 @@ func FindStructField[C any](obj interface{}, fieldName string) (C, error) {
574
576
575
577
field := rValue .Elem ().FieldByName (fieldName )
576
578
if ! field .IsValid () {
577
- return * new (C ), fmt .Errorf ("interface `%s` does not have the field `%s`" , // nolint: goerr113
579
+ return * new (C ), fmt .Errorf ("interface `%s` does not have the field `%s`" ,
578
580
rValue .Type (),
579
581
fieldName )
580
582
}
581
583
582
584
res , valid := field .Interface ().(C )
583
585
if ! valid {
584
- return * new (C ), fmt .Errorf ( // nolint: goerr113
586
+ return * new (C ), fmt .Errorf (
585
587
"object's `%s` expected type `%s` does not match actual `%s`" ,
586
588
fieldName ,
587
589
reflect .TypeOf (* new (C )), field .Type ().String ())
0 commit comments