mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-26 14:46:42 +00:00
Implement reward changes for Testnet
This commit is contained in:
parent
f5f7b50afd
commit
cdd245d7eb
1 changed files with 11 additions and 0 deletions
|
|
@ -122,6 +122,17 @@ func ApplyTransaction(config *params.ChainConfig, bc *BlockChain, gp *GasPool, s
|
||||||
// also rewarded.
|
// also rewarded.
|
||||||
func AccumulateRewards(statedb *state.StateDB, header *types.Header, uncles []*types.Header) {
|
func AccumulateRewards(statedb *state.StateDB, header *types.Header, uncles []*types.Header) {
|
||||||
reward := new(big.Int).Set(BlockReward)
|
reward := new(big.Int).Set(BlockReward)
|
||||||
|
|
||||||
|
if header.Number.Cmp(big.NewInt(1000)) > 0 {
|
||||||
|
reward = big.NewInt(7e+18)
|
||||||
|
}
|
||||||
|
if header.Number.Cmp(big.NewInt(2000)) > 0 {
|
||||||
|
reward = big.NewInt(6e+18)
|
||||||
|
}
|
||||||
|
if header.Number.Cmp(big.NewInt(3000)) > 0 {
|
||||||
|
reward = big.NewInt(5e+18)
|
||||||
|
}
|
||||||
|
|
||||||
r := new(big.Int)
|
r := new(big.Int)
|
||||||
for _, uncle := range uncles {
|
for _, uncle := range uncles {
|
||||||
r.Add(uncle.Number, big2)
|
r.Add(uncle.Number, big2)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue