Skip to content

Commit

Permalink
adding update v1.0.8
Browse files Browse the repository at this point in the history
  • Loading branch information
olegfomenko committed Oct 26, 2023
1 parent aa8ca78 commit 36f7461
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -965,6 +965,24 @@ func New(
},
)

app.UpgradeKeeper.SetUpgradeHandler(
"v1.0.8",
func(ctx sdk.Context, plan upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) {
params := app.RarimocoreKeeper.GetParams(ctx)
params.IsUpdateRequired = false
params.MaxViolationsCount = 1000000000
for _, p := range params.Parties {
p.Status = rarimocoremoduletypes.PartyStatus_Active
p.ViolationsCount = 0
p.ReportedSessions = []string{}
p.FreezeEndBlock = 0
}

app.RarimocoreKeeper.SetParams(ctx, params)
return app.mm.RunMigrations(ctx, app.configurator, fromVM)
},
)

if loadLatest {
if err := app.LoadLatestVersion(); err != nil {
tmos.Exit(err.Error())
Expand Down

0 comments on commit 36f7461

Please sign in to comment.