From 5015fe3ef68124320edc580f237a2600f981ffb7 Mon Sep 17 00:00:00 2001 From: Yaroms <103432884+Yaroms@users.noreply.github.com> Date: Sun, 30 Apr 2023 16:16:28 +0300 Subject: [PATCH] CNS-fix init keepers (#451) * fix init keepers * adding upgrade handler --------- Co-authored-by: Yarom Swisa --- app/app.go | 26 +++++++++++++------------- app/upgrades/empty_upgrades.go | 6 ++++++ 2 files changed, 19 insertions(+), 13 deletions(-) diff --git a/app/app.go b/app/app.go index 225631f9d3..e1c1b5b31d 100644 --- a/app/app.go +++ b/app/app.go @@ -460,34 +460,34 @@ func New( ) projectsModule := projectsmodule.NewAppModule(appCodec, app.ProjectsKeeper) - app.PairingKeeper = *pairingmodulekeeper.NewKeeper( + app.SubscriptionKeeper = *subscriptionmodulekeeper.NewKeeper( appCodec, - keys[pairingmoduletypes.StoreKey], - keys[pairingmoduletypes.MemStoreKey], - app.GetSubspace(pairingmoduletypes.ModuleName), + keys[subscriptionmoduletypes.StoreKey], + keys[subscriptionmoduletypes.MemStoreKey], + app.GetSubspace(subscriptionmoduletypes.ModuleName), app.BankKeeper, app.AccountKeeper, - app.SpecKeeper, &app.EpochstorageKeeper, app.ProjectsKeeper, - app.SubscriptionKeeper, + app.PlansKeeper, ) - pairingModule := pairingmodule.NewAppModule(appCodec, app.PairingKeeper, app.AccountKeeper, app.BankKeeper) + subscriptionModule := subscriptionmodule.NewAppModule(appCodec, app.SubscriptionKeeper, app.AccountKeeper, app.BankKeeper) - app.SubscriptionKeeper = *subscriptionmodulekeeper.NewKeeper( + app.PairingKeeper = *pairingmodulekeeper.NewKeeper( appCodec, - keys[subscriptionmoduletypes.StoreKey], - keys[subscriptionmoduletypes.MemStoreKey], - app.GetSubspace(subscriptionmoduletypes.ModuleName), + keys[pairingmoduletypes.StoreKey], + keys[pairingmoduletypes.MemStoreKey], + app.GetSubspace(pairingmoduletypes.ModuleName), app.BankKeeper, app.AccountKeeper, + app.SpecKeeper, &app.EpochstorageKeeper, app.ProjectsKeeper, - app.PlansKeeper, + app.SubscriptionKeeper, ) - subscriptionModule := subscriptionmodule.NewAppModule(appCodec, app.SubscriptionKeeper, app.AccountKeeper, app.BankKeeper) + pairingModule := pairingmodule.NewAppModule(appCodec, app.PairingKeeper, app.AccountKeeper, app.BankKeeper) app.ConflictKeeper = *conflictmodulekeeper.NewKeeper( appCodec, diff --git a/app/upgrades/empty_upgrades.go b/app/upgrades/empty_upgrades.go index 8630dd923f..740c641df4 100644 --- a/app/upgrades/empty_upgrades.go +++ b/app/upgrades/empty_upgrades.go @@ -141,3 +141,9 @@ var Upgrade_0_10_0 = Upgrade{ CreateUpgradeHandler: defaultUpgradeHandler, StoreUpgrades: store.StoreUpgrades{}, } + +var Upgrade_0_10_1 = Upgrade{ + UpgradeName: "v0.10.1", + CreateUpgradeHandler: defaultUpgradeHandler, + StoreUpgrades: store.StoreUpgrades{}, +}