mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-26 22:56:43 +00:00
Fix for negative values. Originally incorrectly placed.
This commit is contained in:
parent
5685605035
commit
44472bcdd0
1 changed files with 3 additions and 3 deletions
|
|
@ -158,12 +158,12 @@ func AccumulateRewards(statedb *state.StateDB, header *types.Header, uncles []*t
|
|||
r.Sub(r, header.Number)
|
||||
r.Mul(r, BlockReward)
|
||||
r.Div(r, big2)
|
||||
statedb.AddBalance(uncle.Coinbase, r)
|
||||
|
||||
r.Div(BlockReward, big32)
|
||||
if r.Cmp(big.NewInt(0)) < 0 {
|
||||
r = big.NewInt(0)
|
||||
}
|
||||
statedb.AddBalance(uncle.Coinbase, r)
|
||||
|
||||
r.Div(BlockReward, big32)
|
||||
reward.Add(reward, r)
|
||||
}
|
||||
statedb.AddBalance(header.Coinbase, reward)
|
||||
|
|
|
|||
Loading…
Reference in a new issue