Skip to content

Commit

Permalink
Run account plus migration in v8 upgrade (backport #2628) (#2629)
Browse files Browse the repository at this point in the history
Co-authored-by: jayy04 <[email protected]>
  • Loading branch information
mergify[bot] and jayy04 authored Dec 6, 2024
1 parent 1492a32 commit c0a8826
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions protocol/app/upgrades.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ func (app *App) setupUpgradeHandlers() {
app.PricesKeeper,
app.PerpetualsKeeper,
app.ClobKeeper,
app.AccountPlusKeeper,
),
)
}
Expand Down
3 changes: 3 additions & 0 deletions protocol/app/upgrades/v8.0/upgrade.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,14 @@ func CreateUpgradeHandler(
pricesKeeper pricestypes.PricesKeeper,
perpetualsKeeper perptypes.PerpetualsKeeper,
clobKeeper clobtypes.ClobKeeper,
accountplusKeeper accountpluskeeper.Keeper,
) upgradetypes.UpgradeHandler {
return func(ctx context.Context, plan upgradetypes.Plan, vm module.VersionMap) (module.VersionMap, error) {
sdkCtx := lib.UnwrapSDKContext(ctx, "app/upgrades")
sdkCtx.Logger().Info(fmt.Sprintf("Running %s Upgrade...", UpgradeName))

MigrateAccountplusAccountState(sdkCtx, accountplusKeeper)

// Set market, perpetual, and clob ids to a set number
setMarketListingBaseIds(sdkCtx, pricesKeeper, perpetualsKeeper, clobKeeper)

Expand Down

0 comments on commit c0a8826

Please sign in to comment.