Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add default upgrade handler for v8.1 (backport #5636) #5645

Merged
merged 1 commit into from
Jan 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion testing/simapp/upgrades.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,15 @@ func (app *SimApp) registerUpgradeHandlers() {

app.UpgradeKeeper.SetUpgradeHandler(
upgrades.V8,
upgrades.CreateV8UpgradeHandler(
upgrades.CreateDefaultUpgradeHandler(
app.ModuleManager,
app.configurator,
),
)

app.UpgradeKeeper.SetUpgradeHandler(
upgrades.V8_1,
upgrades.CreateDefaultUpgradeHandler(
app.ModuleManager,
app.configurator,
),
Expand Down
9 changes: 2 additions & 7 deletions testing/simapp/upgrades/upgrades.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ const (
V7_1 = "v7.1"
// V8 defines the upgrade name for the ibc-go/v8 upgrade handler.
V8 = "v8"
// V8_1 defines the upgrade name for the ibc-go/v8.1 upgrade handler.
V8_1 = "v8.1"
)

// CreateDefaultUpgradeHandler creates an upgrade handler which can be used for regular upgrade tests
Expand Down Expand Up @@ -107,10 +109,3 @@ func CreateV7LocalhostUpgradeHandler(
return mm.RunMigrations(ctx, configurator, vm)
}
}

// CreateV8UpgradeHandler creates an upgrade handler for the ibc-go/v8 SimApp upgrade.
func CreateV8UpgradeHandler(mm *module.Manager, configurator module.Configurator) upgradetypes.UpgradeHandler {
return func(ctx context.Context, _ upgradetypes.Plan, vm module.VersionMap) (module.VersionMap, error) {
return mm.RunMigrations(ctx, configurator, vm)
}
}
Loading