aboutsummaryrefslogtreecommitdiffstats
path: root/miner/worker.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2015-04-02 03:18:41 +0800
committerobscuren <geffobscura@gmail.com>2015-04-02 03:18:41 +0800
commit344b3556ebd8c96f96d78ad2d9d386e6ed66ce0a (patch)
tree2216ff16ed60340f904b889b532ef513e21bb451 /miner/worker.go
parent516ec28544e0f9c76e18d82742d3ae58cfb59cc1 (diff)
downloaddexon-344b3556ebd8c96f96d78ad2d9d386e6ed66ce0a.tar
dexon-344b3556ebd8c96f96d78ad2d9d386e6ed66ce0a.tar.gz
dexon-344b3556ebd8c96f96d78ad2d9d386e6ed66ce0a.tar.bz2
dexon-344b3556ebd8c96f96d78ad2d9d386e6ed66ce0a.tar.lz
dexon-344b3556ebd8c96f96d78ad2d9d386e6ed66ce0a.tar.xz
dexon-344b3556ebd8c96f96d78ad2d9d386e6ed66ce0a.tar.zst
dexon-344b3556ebd8c96f96d78ad2d9d386e6ed66ce0a.zip
Fixed uncle rewards in miner
The uncle rewards were changed in the block processor. This change will reflect those changes in the miner as well.
Diffstat (limited to 'miner/worker.go')
-rw-r--r--miner/worker.go5
1 files changed, 1 insertions, 4 deletions
diff --git a/miner/worker.go b/miner/worker.go
index e3680dea3..d89519fb1 100644
--- a/miner/worker.go
+++ b/miner/worker.go
@@ -270,7 +270,7 @@ gasLimit:
self.current.block.SetUncles(uncles)
- self.current.state.AddBalance(self.coinbase, core.BlockReward)
+ core.AccumulateRewards(self.current.state, self.current.block)
self.current.state.Update(common.Big0)
self.push()
@@ -297,9 +297,6 @@ func (self *worker) commitUncle(uncle *types.Header) error {
return core.UncleError(fmt.Sprintf("Uncle already in family (%x)", uncle.Hash()))
}
- self.current.state.AddBalance(uncle.Coinbase, uncleReward)
- self.current.state.AddBalance(self.coinbase, inclusionReward)
-
return nil
}