diff --git a/app/app.go b/app/app.go index bcb5b9563..3ce8635ec 100644 --- a/app/app.go +++ b/app/app.go @@ -663,7 +663,7 @@ func NewElysApp( // insert epoch hooks receivers here app.OracleKeeper.Hooks(), app.CommitmentKeeper.Hooks(), - // app.IncentiveKeeper.Hooks(), + app.IncentiveKeeper.Hooks(), app.BurnerKeeper.Hooks(), ), ) diff --git a/app/setup_handlers.go b/app/setup_handlers.go index de8aa9e68..385aeb590 100644 --- a/app/setup_handlers.go +++ b/app/setup_handlers.go @@ -19,6 +19,9 @@ func setUpgradeHandler(app *ElysApp) { app.UpgradeKeeper.SetUpgradeHandler(version.Version, func(ctx sdk.Context, plan types.Plan, vm m.VersionMap) (m.VersionMap, error) { app.Logger().Info("Running upgrade handler for " + version.Version) + // init genesis for new incentive module + app.IncentiveKeeper.InitGenesis(ctx, *incentivemoduletypes.DefaultGenesis()) + return app.mm.RunMigrations(ctx, app.configurator, vm) }) } @@ -31,7 +34,7 @@ func loadUpgradeStore(app *ElysApp) { if shouldLoadUpgradeStore(app, upgradeInfo) { storeUpgrades := storetypes.StoreUpgrades{ - Added: []string{incentivemoduletypes.StoreKey}, + // Added: []string{}, } // Use upgrade store loader for the initial loading of all stores when app starts, // it checks if version == upgradeHeight and applies store upgrades before loading the stores,