From 91c45cabf35d9b8c93ffd8d96af4e8e92f0aeb5b Mon Sep 17 00:00:00 2001 From: Youngtaek Yoon Date: Fri, 28 Jan 2022 01:52:36 +0000 Subject: [PATCH] feat: apply VoterSetCounter (#31) * feat: introduce `VoterSetCounter` * docs: update CHANGELOG --- CHANGELOG.md | 1 + app/export.go | 2 +- go.mod | 2 +- go.sum | 2 ++ 4 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1fc2d7e9..a966b68c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -39,6 +39,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ ### Features ### Improvements +* (slashing) [\#31] (https://github.com/line/lbm/pull/31) Apply VoterSetCounter ### Bug Fixes diff --git a/app/export.go b/app/export.go index eba7468c..9dc109e8 100644 --- a/app/export.go +++ b/app/export.go @@ -188,7 +188,7 @@ func (app *LinkApp) prepForZeroHeightGenesis(ctx sdk.Context, jailAllowedAddrs [ app.SlashingKeeper.IterateValidatorSigningInfos( ctx, func(addr sdk.ConsAddress, info slashingtypes.ValidatorSigningInfo) (stop bool) { - info.StartHeight = 0 + info.VoterSetCounter = 0 app.SlashingKeeper.SetValidatorSigningInfo(ctx, addr, info) return false }, diff --git a/go.mod b/go.mod index e2204164..92e320af 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,7 @@ go 1.15 require ( github.com/gorilla/mux v1.8.0 - github.com/line/lbm-sdk v0.43.0-rc0 + github.com/line/lbm-sdk v1.0.0-init.1.0.20211014094036-597550200cdf github.com/line/ostracon v0.34.9-0.20210930060702-30b70e254d83 github.com/line/tm-db/v2 v2.0.0-init.1.0.20210824011847-fcfa67dd3c70 github.com/prometheus/client_golang v1.11.0 diff --git a/go.sum b/go.sum index 26ad3979..49a7f55c 100644 --- a/go.sum +++ b/go.sum @@ -477,6 +477,8 @@ github.com/line/iavl/v2 v2.0.0-init.1.0.20210602045707-fddfe1f85001 h1:c2URk0zxM github.com/line/iavl/v2 v2.0.0-init.1.0.20210602045707-fddfe1f85001/go.mod h1:0Xz+0i1nlB9lrjUDEwpDRhcmjfEAkOjd20dRb40FBso= github.com/line/lbm-sdk v0.43.0-rc0 h1:pO1lVVnJrXCPDMZoUBanNsyHu3ilDrUm8uy7lRgLasc= github.com/line/lbm-sdk v0.43.0-rc0/go.mod h1:CtoO7aEidYmFc/45nT4337QgjJ6R09sHXcjMwsSVAG0= +github.com/line/lbm-sdk v1.0.0-init.1.0.20211014094036-597550200cdf h1:0r4BXNU/0AdySP/1pMqrtvM9IUGTdZE46iyRvXgFBYg= +github.com/line/lbm-sdk v1.0.0-init.1.0.20211014094036-597550200cdf/go.mod h1:CtoO7aEidYmFc/45nT4337QgjJ6R09sHXcjMwsSVAG0= github.com/line/ostracon v0.34.9-0.20210429084710-ef4fe0a40c7d/go.mod h1:ttnbq+yQJMQ9a2MT5SEisOoa/+pOgh2KenTiK/rVdiw= github.com/line/ostracon v0.34.9-0.20210930060702-30b70e254d83 h1:WuIvAw43Jhcr/F8ZcLFBf8jGPGPA8MxIf5fo4sHhqnM= github.com/line/ostracon v0.34.9-0.20210930060702-30b70e254d83/go.mod h1:elTiUFLvBz6Yaze+ZZLlbUnhqKWLJ7cMy/P9rSabafQ=