Skip to content

Commit

Permalink
Reduce rewards for including uncles in blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
jyap808 committed Dec 4, 2016
1 parent c6820a9 commit a542816
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions core/state_processor.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import (
)

var (
big8 = big.NewInt(8)
big2 = big.NewInt(2)
big32 = big.NewInt(32)
)

Expand Down Expand Up @@ -124,10 +124,10 @@ func AccumulateRewards(statedb *state.StateDB, header *types.Header, uncles []*t
reward := new(big.Int).Set(BlockReward)
r := new(big.Int)
for _, uncle := range uncles {
r.Add(uncle.Number, big8)
r.Add(uncle.Number, big2)
r.Sub(r, header.Number)
r.Mul(r, BlockReward)
r.Div(r, big8)
r.Div(r, big2)
statedb.AddBalance(uncle.Coinbase, r)

r.Div(BlockReward, big32)
Expand Down

0 comments on commit a542816

Please sign in to comment.