aboutsummaryrefslogtreecommitdiffstats
path: root/ethchain/state_manager.go
diff options
context:
space:
mode:
Diffstat (limited to 'ethchain/state_manager.go')
-rw-r--r--ethchain/state_manager.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/ethchain/state_manager.go b/ethchain/state_manager.go
index 4c001a387..0f8ef19a7 100644
--- a/ethchain/state_manager.go
+++ b/ethchain/state_manager.go
@@ -284,13 +284,13 @@ func CalculateUncleReward(block *Block) *big.Int {
func (sm *StateManager) AccumelateRewards(block *Block) error {
// Get the coinbase rlp data
- addr := sm.procState.GetAccount(block.Coinbase)
+ acc := sm.procState.GetAccount(block.Coinbase)
// Reward amount of ether to the coinbase address
- addr.AddFee(CalculateBlockReward(block, len(block.Uncles)))
+ acc.AddFee(CalculateBlockReward(block, len(block.Uncles)))
- acc := make([]byte, len(block.Coinbase))
- copy(acc, block.Coinbase)
- sm.procState.UpdateAccount(acc, addr)
+ addr := make([]byte, len(block.Coinbase))
+ copy(addr, block.Coinbase)
+ sm.procState.UpdateAccount(addr, acc)
for _, uncle := range block.Uncles {
uncleAddr := sm.procState.GetAccount(uncle.Coinbase)