From 9a05fa0b17f7d31c3efb5b40d70c5472dfdbaf2b Mon Sep 17 00:00:00 2001 From: Roman Date: Tue, 24 May 2022 08:08:46 -0700 Subject: [PATCH] refactor: expsoe SetAppVersion on the upgrade keeper to allow overwriting during the upgrade (#244) --- x/upgrade/keeper/keeper.go | 5 +++++ x/upgrade/keeper/util_test.go | 8 -------- 2 files changed, 5 insertions(+), 8 deletions(-) delete mode 100644 x/upgrade/keeper/util_test.go diff --git a/x/upgrade/keeper/keeper.go b/x/upgrade/keeper/keeper.go index b67cb4ef16d1..a9d6e59081af 100644 --- a/x/upgrade/keeper/keeper.go +++ b/x/upgrade/keeper/keeper.go @@ -83,6 +83,11 @@ func (k Keeper) SetModuleVersionMap(ctx sdk.Context, vm module.VersionMap) { } } +// SetAppVersion sets app version to version +func (k Keeper) SetAppVersion(ctx sdk.Context, version uint64) error { + return k.versionManager.SetAppVersion(ctx, version) +} + // GetModuleVersionMap returns a map of key module name and value module consensus version // as defined in ADR-041. func (k Keeper) GetModuleVersionMap(ctx sdk.Context) module.VersionMap { diff --git a/x/upgrade/keeper/util_test.go b/x/upgrade/keeper/util_test.go deleted file mode 100644 index 354a0ea93b91..000000000000 --- a/x/upgrade/keeper/util_test.go +++ /dev/null @@ -1,8 +0,0 @@ -package keeper - -import sdk "github.com/cosmos/cosmos-sdk/types" - -// SetAppVersion sets the app version to version. Used for testing the upgrade keeper. -func (k *Keeper) SetAppVersion(ctx sdk.Context, version uint64) error { - return k.versionManager.SetAppVersion(ctx, version) -}