Skip to content

Commit

Permalink
Merge pull request #777 from MinterTeam/dev
Browse files Browse the repository at this point in the history
hot-fix
  • Loading branch information
Klimov Sergey authored Apr 12, 2022
2 parents 48c921b + 99aac78 commit d6a917c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions coreV2/minter/blockchain.go
Original file line number Diff line number Diff line change
Expand Up @@ -432,10 +432,13 @@ func (blockchain *Blockchain) EndBlock(req abciTypes.RequestEndBlock) abciTypes.
emission := blockchain.appDB.Emission()
if emission == nil {
blockchain.appDB.SetEmission(blockchain.rewardsCounter.GetBeforeBlock(height - 1))
reward = blockchain.rewardsCounter.GetRewardForBlock(height)
} else if emission.Cmp(blockchain.rewardsCounter.TotalEmissionBig()) == -1 {
reward, _ = blockchain.stateDeliver.App.Reward()
heightIsMaxIfIssueIsOverOrNotDynamic = height
if reward == nil {
reward = blockchain.rewardsCounter.GetRewardForBlock(height)
} else {
heightIsMaxIfIssueIsOverOrNotDynamic = height
}
}

} else if h == height {
Expand Down

0 comments on commit d6a917c

Please sign in to comment.