Skip to content

Commit

Permalink
Merge pull request #1738 Fix inflation calculation period check
Browse files Browse the repository at this point in the history
x/stake: Fix inflation calculation period check
  • Loading branch information
rigelrozanski authored Jul 18, 2018
2 parents d1a65a1 + c01a3d2 commit a8b6a10
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion x/stake/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down

0 comments on commit a8b6a10

Please sign in to comment.