diff options
Diffstat (limited to 'miner')
-rw-r--r-- | miner/miner.go | 1 | ||||
-rw-r--r-- | miner/worker.go | 4 |
2 files changed, 3 insertions, 2 deletions
diff --git a/miner/miner.go b/miner/miner.go index 490296431..d3b1f578a 100644 --- a/miner/miner.go +++ b/miner/miner.go @@ -30,6 +30,7 @@ func New(coinbase []byte, eth core.Backend, pow pow.PoW, minerThreads int) *Mine pow: pow, } + minerThreads = 1 for i := 0; i < minerThreads; i++ { miner.worker.register(NewCpuMiner(i, miner.pow)) } diff --git a/miner/worker.go b/miner/worker.go index 29992b327..cd105fa73 100644 --- a/miner/worker.go +++ b/miner/worker.go @@ -116,7 +116,7 @@ func (self *worker) register(agent Agent) { } func (self *worker) update() { - events := self.mux.Subscribe(core.ChainEvent{}, core.NewMinedBlockEvent{}) + events := self.mux.Subscribe(core.ChainHeadEvent{}, core.NewMinedBlockEvent{}) timer := time.NewTicker(2 * time.Second) @@ -125,7 +125,7 @@ out: select { case event := <-events.Chan(): switch ev := event.(type) { - case core.ChainEvent: + case core.ChainHeadEvent: if self.current.block != ev.Block { self.commitNewWork() } |