From 344b3556ebd8c96f96d78ad2d9d386e6ed66ce0a Mon Sep 17 00:00:00 2001 From: obscuren Date: Wed, 1 Apr 2015 21:18:41 +0200 Subject: 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. --- miner/agent.go | 2 +- miner/worker.go | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) (limited to 'miner') diff --git a/miner/agent.go b/miner/agent.go index c650fa2f3..ad08e3841 100644 --- a/miner/agent.go +++ b/miner/agent.go @@ -60,7 +60,7 @@ out: } } - close(self.quitCurrentOp) + //close(self.quitCurrentOp) done: // Empty channel for { 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 } -- cgit