From cdd245d7ebe25dff8914555d4946e6592a58ff52 Mon Sep 17 00:00:00 2001 From: Julian Yap Date: Sat, 10 Dec 2016 21:55:35 -1000 Subject: [PATCH] Implement reward changes for Testnet --- core/state_processor.go | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/core/state_processor.go b/core/state_processor.go index 9e330a4a44..409a38d476 100644 --- a/core/state_processor.go +++ b/core/state_processor.go @@ -122,6 +122,17 @@ func ApplyTransaction(config *params.ChainConfig, bc *BlockChain, gp *GasPool, s // also rewarded. func AccumulateRewards(statedb *state.StateDB, header *types.Header, uncles []*types.Header) { 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) for _, uncle := range uncles { r.Add(uncle.Number, big2)