aboutsummaryrefslogtreecommitdiffstats
path: root/miner/worker.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2015-03-24 20:37:38 +0800
committerobscuren <geffobscura@gmail.com>2015-03-24 20:37:38 +0800
commiteab8f7355de56a6a9128b283c560d00e85c000c4 (patch)
treec8918183101c484b2f8e40a7baae76b1b78ed92e /miner/worker.go
parent576df064e5cd4bc027120791484cb8100646f284 (diff)
downloaddexon-eab8f7355de56a6a9128b283c560d00e85c000c4.tar
dexon-eab8f7355de56a6a9128b283c560d00e85c000c4.tar.gz
dexon-eab8f7355de56a6a9128b283c560d00e85c000c4.tar.bz2
dexon-eab8f7355de56a6a9128b283c560d00e85c000c4.tar.lz
dexon-eab8f7355de56a6a9128b283c560d00e85c000c4.tar.xz
dexon-eab8f7355de56a6a9128b283c560d00e85c000c4.tar.zst
dexon-eab8f7355de56a6a9128b283c560d00e85c000c4.zip
Event fixes for miner
Diffstat (limited to 'miner/worker.go')
-rw-r--r--miner/worker.go8
1 files changed, 3 insertions, 5 deletions
diff --git a/miner/worker.go b/miner/worker.go
index 3c3411fa9..1a6da505f 100644
--- a/miner/worker.go
+++ b/miner/worker.go
@@ -126,11 +126,9 @@ out:
case event := <-events.Chan():
switch ev := event.(type) {
case core.ChainHeadEvent:
- if self.current.block != ev.Block {
- self.commitNewWork()
- }
- case core.NewMinedBlockEvent:
self.commitNewWork()
+ case core.NewMinedBlockEvent:
+ //self.commitNewWork()
case core.ChainSideEvent:
self.uncleMu.Lock()
self.possibleUncles[ev.Block.Hash()] = ev.Block
@@ -261,7 +259,7 @@ gasLimit:
uncles = append(uncles, uncle.Header())
}
}
- minerlogger.Infof("commit new work with %d txs & %d uncles\n", tcount, len(uncles))
+ minerlogger.Infof("commit new work on block %v with %d txs & %d uncles\n", self.current.block.Number(), tcount, len(uncles))
for _, hash := range badUncles {
delete(self.possibleUncles, hash)
}