diff options
author | Jeffrey Wilcke <jeffrey@ethereum.org> | 2015-05-19 02:13:53 +0800 |
---|---|---|
committer | Jeffrey Wilcke <jeffrey@ethereum.org> | 2015-05-19 02:13:53 +0800 |
commit | bd0c0a633bebe8893c4b06a50740047e4376107c (patch) | |
tree | 0b0632fa78f80206eb1fd96dd2b3d3e6b43ac1aa /miner/worker.go | |
parent | d6adadc5e37f3d01cac25b5371e1c42b7036735a (diff) | |
parent | 40717465bc8c0e2feb0f1e48ddc721c7292ba992 (diff) | |
download | go-tangerine-bd0c0a633bebe8893c4b06a50740047e4376107c.tar go-tangerine-bd0c0a633bebe8893c4b06a50740047e4376107c.tar.gz go-tangerine-bd0c0a633bebe8893c4b06a50740047e4376107c.tar.bz2 go-tangerine-bd0c0a633bebe8893c4b06a50740047e4376107c.tar.lz go-tangerine-bd0c0a633bebe8893c4b06a50740047e4376107c.tar.xz go-tangerine-bd0c0a633bebe8893c4b06a50740047e4376107c.tar.zst go-tangerine-bd0c0a633bebe8893c4b06a50740047e4376107c.zip |
Merge pull request #1022 from obscuren/parallel_nonce_checks
Parallelise nonce checks
Diffstat (limited to 'miner/worker.go')
-rw-r--r-- | miner/worker.go | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/miner/worker.go b/miner/worker.go index d5f9dd8c5..5fa5d3777 100644 --- a/miner/worker.go +++ b/miner/worker.go @@ -224,7 +224,13 @@ func (self *worker) wait() { } self.mux.Post(core.NewMinedBlockEvent{block}) - glog.V(logger.Info).Infof("🔨 Mined block #%v", block.Number()) + var stale string + canonBlock := self.chain.GetBlockByNumber(block.NumberU64()) + if canonBlock != nil && canonBlock.Hash() != block.Hash() { + stale = "stale-" + } + + glog.V(logger.Info).Infof("🔨 Mined %sblock #%v (%x)", stale, block.Number(), block.Hash().Bytes()[:4]) jsonlogger.LogJson(&logger.EthMinerNewBlock{ BlockHash: block.Hash().Hex(), |