Merge pull request #1738 Fix inflation calculation period check

x/stake: Fix inflation calculation period check
This commit is contained in:
Rigel 2018-07-18 14:15:40 -04:00 committed by GitHub
commit a8b6a10b63
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -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

View File

@ -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)
}