aboutsummaryrefslogtreecommitdiffstats
path: root/miner/worker.go
diff options
context:
space:
mode:
authorJeffrey Wilcke <jeffrey@ethereum.org>2015-05-19 02:13:53 +0800
committerJeffrey Wilcke <jeffrey@ethereum.org>2015-05-19 02:13:53 +0800
commitbd0c0a633bebe8893c4b06a50740047e4376107c (patch)
tree0b0632fa78f80206eb1fd96dd2b3d3e6b43ac1aa /miner/worker.go
parentd6adadc5e37f3d01cac25b5371e1c42b7036735a (diff)
parent40717465bc8c0e2feb0f1e48ddc721c7292ba992 (diff)
downloadgo-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.go8
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(),