From 48c2f77a274c0af31ba2d916388f18e239c09a2f Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Wed, 8 Jun 2022 11:17:13 -0400 Subject: [PATCH] fix(upgrades): perform no-op if 'from' and 'to' migration version are equal (#12174) (#12192) --- types/module/configurator.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/types/module/configurator.go b/types/module/configurator.go index 07c3b50942cc..5d2a6d30e2e9 100644 --- a/types/module/configurator.go +++ b/types/module/configurator.go @@ -89,8 +89,8 @@ func (c configurator) RegisterMigration(moduleName string, forVersion uint64, ha // runModuleMigrations runs all in-place store migrations for one given module from a // version to another version. func (c configurator) runModuleMigrations(ctx sdk.Context, moduleName string, fromVersion, toVersion uint64) error { - // No-op if toVersion is the initial version. - if toVersion <= 1 { + // No-op if toVersion is the initial version or if the version is unchanged. + if toVersion <= 1 || fromVersion == toVersion { return nil }