From b97ebef85eb0a9e6ba1e13c281e8e06832fc9221 Mon Sep 17 00:00:00 2001 From: Hendrik Hofstadt Date: Wed, 18 Jul 2018 13:12:49 +0200 Subject: [PATCH 1/2] Fix inflation calculation period check --- x/stake/handler.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x/stake/handler.go b/x/stake/handler.go index b39298edebc1..14fb4f7bfffe 100644 --- a/x/stake/handler.go +++ b/x/stake/handler.go @@ -39,7 +39,7 @@ func EndBlocker(ctx sdk.Context, k keeper.Keeper) (ValidatorUpdates []abci.Valid // Process types.Validator Provisions blockTime := ctx.BlockHeader().Time - if pool.InflationLastTime+blockTime >= 3600 { + if blockTime-pool.InflationLastTime >= 3600 { pool.InflationLastTime = blockTime pool = pool.ProcessProvisions(params) } From c01a3d218f2544b00b817942e996e171c397b2a4 Mon Sep 17 00:00:00 2001 From: Hendrik Hofstadt Date: Wed, 18 Jul 2018 13:27:16 +0200 Subject: [PATCH 2/2] update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a4f9942dd70a..e4324e73ceac 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ## PENDING BREAKING CHANGES +* [x/stake] Fixed the period check for the inflation calculation FEATURES * [lcd] Can now query governance proposals by ProposalStatus