aboutsummaryrefslogtreecommitdiffstats
path: root/miner/worker.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2015-04-20 03:45:40 +0800
committerobscuren <geffobscura@gmail.com>2015-04-20 03:45:40 +0800
commit2c1a6a349b4f8bb23e37a75d8d8ceaa0fbfced8d (patch)
treefd32a029985128ffa8a0c0581c063d46b94954d2 /miner/worker.go
parented07ffcde5ab661a9fd41045c5ec102e7839001c (diff)
downloaddexon-2c1a6a349b4f8bb23e37a75d8d8ceaa0fbfced8d.tar.gz
dexon-2c1a6a349b4f8bb23e37a75d8d8ceaa0fbfced8d.tar.zst
dexon-2c1a6a349b4f8bb23e37a75d8d8ceaa0fbfced8d.zip
miner: removed default timer & update dag when threads > 0
Diffstat (limited to 'miner/worker.go')
-rw-r--r--miner/worker.go12
1 files changed, 0 insertions, 12 deletions
diff --git a/miner/worker.go b/miner/worker.go
index daabd3db5..63645cd54 100644
--- a/miner/worker.go
+++ b/miner/worker.go
@@ -6,7 +6,6 @@ import (
"sort"
"sync"
"sync/atomic"
- "time"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core"
@@ -151,8 +150,6 @@ func (self *worker) register(agent Agent) {
func (self *worker) update() {
events := self.mux.Subscribe(core.ChainHeadEvent{}, core.ChainSideEvent{}, core.TxPreEvent{})
- timer := time.NewTicker(2 * time.Second)
-
out:
for {
select {
@@ -171,15 +168,6 @@ out:
}
case <-self.quit:
break out
- case <-timer.C:
- if glog.V(logger.Detail) && atomic.LoadInt64(&self.mining) == 1 {
- glog.Infoln("Hash rate:", self.HashRate(), "Khash")
- }
-
- // XXX In case all mined a possible uncle
- if atomic.LoadInt64(&self.atWork) == 0 && atomic.LoadInt64(&self.mining) == 1 {
- self.commitNewWork()
- }
}
}