From 36f74610727b7c18d6ccab8d12358ff860f3af8d Mon Sep 17 00:00:00 2001 From: olegfomenko2002 Date: Thu, 26 Oct 2023 18:07:12 +0300 Subject: [PATCH] adding update v1.0.8 --- app/app.go | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/app/app.go b/app/app.go index 789b2741..10b9bf64 100644 --- a/app/app.go +++ b/app/app.go @@ -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())