mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-26 06:36:43 +00:00
Reduce rewards for including uncles in blocks
This commit is contained in:
parent
c6820a988e
commit
a542816c86
1 changed files with 3 additions and 3 deletions
|
|
@ -29,7 +29,7 @@ import (
|
|||
)
|
||||
|
||||
var (
|
||||
big8 = big.NewInt(8)
|
||||
big2 = big.NewInt(2)
|
||||
big32 = big.NewInt(32)
|
||||
)
|
||||
|
||||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue