diff --git a/cmd/gaia/app/app.go b/cmd/gaia/app/app.go index ab8a27e6c5d9..b0995da96b6f 100644 --- a/cmd/gaia/app/app.go +++ b/cmd/gaia/app/app.go @@ -143,8 +143,8 @@ func (app *GaiaApp) BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock) ab // application updates every end block // nolint: unparam func (app *GaiaApp) EndBlocker(ctx sdk.Context, req abci.RequestEndBlock) abci.ResponseEndBlock { - validatorUpdates := stake.EndBlocker(ctx, app.stakeKeeper) + validatorUpdates := stake.EndBlocker(ctx, app.stakeKeeper) tags, _ := gov.EndBlocker(ctx, app.govKeeper) return abci.ResponseEndBlock{ diff --git a/x/slashing/tick.go b/x/slashing/tick.go index 01984f870bb7..da157ca7a564 100644 --- a/x/slashing/tick.go +++ b/x/slashing/tick.go @@ -11,6 +11,7 @@ import ( // slashing begin block functionality func BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock, sk Keeper) (tags sdk.Tags) { + // Tag the height heightBytes := make([]byte, 8) binary.LittleEndian.PutUint64(heightBytes, uint64(req.Header.Height)) diff --git a/x/stake/handler.go b/x/stake/handler.go index 14fb4f7bfffe..922c1bc48218 100644 --- a/x/stake/handler.go +++ b/x/stake/handler.go @@ -34,19 +34,17 @@ func NewHandler(k keeper.Keeper) sdk.Handler { // Called every block, process inflation, update validator set func EndBlocker(ctx sdk.Context, k keeper.Keeper) (ValidatorUpdates []abci.Validator) { - pool := k.GetPool(ctx) - params := k.GetParams(ctx) - // Process types.Validator Provisions + // Process provision inflation blockTime := ctx.BlockHeader().Time if blockTime-pool.InflationLastTime >= 3600 { + params := k.GetParams(ctx) + pool := k.GetPool(ctx) pool.InflationLastTime = blockTime pool = pool.ProcessProvisions(params) + k.SetPool(ctx, pool) } - // save the params - k.SetPool(ctx, pool) - // reset the intra-transaction counter k.SetIntraTxCounter(ctx, 0)