aboutsummaryrefslogtreecommitdiffstats
path: root/core/block_processor.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2015-02-20 21:01:30 +0800
committerobscuren <geffobscura@gmail.com>2015-02-20 21:01:30 +0800
commitd8ac267f4128117c3fb9736a40f3dbc327582e32 (patch)
tree707896f76c700df83c5cb3ad358d5535e549e694 /core/block_processor.go
parent982f73fa6d6f12874729faacd0db14fc78d518dd (diff)
downloadgo-tangerine-d8ac267f4128117c3fb9736a40f3dbc327582e32.tar
go-tangerine-d8ac267f4128117c3fb9736a40f3dbc327582e32.tar.gz
go-tangerine-d8ac267f4128117c3fb9736a40f3dbc327582e32.tar.bz2
go-tangerine-d8ac267f4128117c3fb9736a40f3dbc327582e32.tar.lz
go-tangerine-d8ac267f4128117c3fb9736a40f3dbc327582e32.tar.xz
go-tangerine-d8ac267f4128117c3fb9736a40f3dbc327582e32.tar.zst
go-tangerine-d8ac267f4128117c3fb9736a40f3dbc327582e32.zip
dirty tracking for state objects fixed
Diffstat (limited to 'core/block_processor.go')
-rw-r--r--core/block_processor.go7
1 files changed, 2 insertions, 5 deletions
diff --git a/core/block_processor.go b/core/block_processor.go
index a9795385f..bfd9d4560 100644
--- a/core/block_processor.go
+++ b/core/block_processor.go
@@ -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
}