dirty tracking for state objects fixed

This commit is contained in:
obscuren
2015-02-20 14:01:30 +01:00
parent 982f73fa6d
commit d8ac267f41
4 changed files with 13 additions and 8 deletions

View File

@ -296,16 +296,13 @@ func (sm *BlockProcessor) AccumulateRewards(statedb *state.StateDB, block, paren
r := new(big.Int)
r.Mul(BlockReward, big.NewInt(15)).Div(r, big.NewInt(16))
uncleAccount := statedb.GetAccount(uncle.Coinbase)
uncleAccount.AddAmount(r)
statedb.AddBalance(uncle.Coinbase, r)
reward.Add(reward, new(big.Int).Div(BlockReward, big.NewInt(32)))
}
// Get the account associated with the coinbase
account := statedb.GetAccount(block.Header().Coinbase)
// Reward amount of ether to the coinbase address
account.AddAmount(reward)
statedb.AddBalance(block.Header().Coinbase, reward)
return nil
}