From f3a1b8218f8574649b6b0963ce337413140ed68c Mon Sep 17 00:00:00 2001 From: yys Date: Sun, 3 Oct 2021 17:27:28 +0900 Subject: [PATCH] remove unused upgrade code for bombay-11 (#568) --- app/app.go | 30 ------------------------------ 1 file changed, 30 deletions(-) diff --git a/app/app.go b/app/app.go index 741bc6e2f..cd1d3ff9d 100644 --- a/app/app.go +++ b/app/app.go @@ -98,7 +98,6 @@ import ( customauth "github.com/terra-money/core/custom/auth" customante "github.com/terra-money/core/custom/auth/ante" customauthrest "github.com/terra-money/core/custom/auth/client/rest" - customlegacyauthv040 "github.com/terra-money/core/custom/auth/legacy/v040" customauthsim "github.com/terra-money/core/custom/auth/simulation" customauthtx "github.com/terra-money/core/custom/auth/tx" customauthz "github.com/terra-money/core/custom/authz" @@ -582,37 +581,8 @@ func NewTerraApp( // Name returns the name of the App func (app *TerraApp) Name() string { return app.BaseApp.Name() } -// MultiSigPubKeyMigrationPlanName upgrade plan name to fix multisig pubkey migration problem -const MultiSigPubKeyMigrationPlanName = "multisig-pubkey-migration" - -// MultiSigPubKeyMigrationChainID target chain-id to apply multisig pubkey migration fix -const MultiSigPubKeyMigrationChainID = "bombay-11" - // BeginBlocker application updates every begin block func (app *TerraApp) BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock) abci.ResponseBeginBlock { - - // NOTE: this handler is only for bombay-11, due to pubkey migration had problem - if ctx.ChainID() == MultiSigPubKeyMigrationChainID { - if plan, found := app.UpgradeKeeper.GetUpgradePlan(ctx); found { - if plan.Name == MultiSigPubKeyMigrationPlanName && plan.Height == ctx.BlockHeight() { - app.UpgradeKeeper.SetUpgradeHandler(MultiSigPubKeyMigrationPlanName, func(ctx sdk.Context, _ upgradetypes.Plan, vm module.VersionMap) (module.VersionMap, error) { - var err error - app.AccountKeeper.IterateAccounts(ctx, func(account authtypes.AccountI) bool { - if account, err = customlegacyauthv040.MigrateAccount(account); err != nil { - return true - } else if account != nil { - app.AccountKeeper.SetAccount(ctx, account) - } - - return false - }) - - return vm, err - }) - } - } - } - return app.mm.BeginBlock(ctx, req) }