diff options
author | Taylor Gerring <taylor.gerring@gmail.com> | 2015-04-02 19:39:46 +0800 |
---|---|---|
committer | Taylor Gerring <taylor.gerring@gmail.com> | 2015-04-02 19:39:46 +0800 |
commit | 118ad22ee59658ec8ff476999e48d9bffb0c7db6 (patch) | |
tree | b60422477450918993bdce27f22cd45d81952bd8 /miner | |
parent | 81de8ed0912f767b2e3104aaad5c7f31920aaf2a (diff) | |
parent | 79828531b1e6a1d5073f45e0e672c54a019de7c0 (diff) | |
download | go-tangerine-118ad22ee59658ec8ff476999e48d9bffb0c7db6.tar go-tangerine-118ad22ee59658ec8ff476999e48d9bffb0c7db6.tar.gz go-tangerine-118ad22ee59658ec8ff476999e48d9bffb0c7db6.tar.bz2 go-tangerine-118ad22ee59658ec8ff476999e48d9bffb0c7db6.tar.lz go-tangerine-118ad22ee59658ec8ff476999e48d9bffb0c7db6.tar.xz go-tangerine-118ad22ee59658ec8ff476999e48d9bffb0c7db6.tar.zst go-tangerine-118ad22ee59658ec8ff476999e48d9bffb0c7db6.zip |
Merge branch 'develop' into rpcfabian
Diffstat (limited to 'miner')
-rw-r--r-- | miner/agent.go | 2 | ||||
-rw-r--r-- | miner/worker.go | 9 |
2 files changed, 5 insertions, 6 deletions
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..4385b51c8 100644 --- a/miner/worker.go +++ b/miner/worker.go @@ -171,6 +171,8 @@ func (self *worker) wait() { } self.mux.Post(core.NewMinedBlockEvent{block}) + minerlogger.Infof("🔨 Mined block #%v", block.Number()) + jsonlogger.LogJson(&logger.EthMinerNewBlock{ BlockHash: block.Hash().Hex(), BlockNumber: block.Number(), @@ -270,9 +272,9 @@ 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.current.state.Update() self.push() } @@ -297,9 +299,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 } |