diff options
author | obscuren <geffobscura@gmail.com> | 2015-03-04 03:13:11 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2015-03-04 03:13:11 +0800 |
commit | 8e995b97ccc92098f5744dd7fc3d8e7e111ca09c (patch) | |
tree | 90e1ab7694f43608798ab770026b0debfed605d6 /miner/agent.go | |
parent | 40ff3cac3943ee672d818776fdd8235fc6684dca (diff) | |
download | dexon-8e995b97ccc92098f5744dd7fc3d8e7e111ca09c.tar.gz dexon-8e995b97ccc92098f5744dd7fc3d8e7e111ca09c.tar.zst dexon-8e995b97ccc92098f5744dd7fc3d8e7e111ca09c.zip |
Fixes and debug added
Diffstat (limited to 'miner/agent.go')
-rw-r--r-- | miner/agent.go | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/miner/agent.go b/miner/agent.go index 5b2bfdb06..6c21d8015 100644 --- a/miner/agent.go +++ b/miner/agent.go @@ -42,11 +42,16 @@ func (self *CpuMiner) Start() { } func (self *CpuMiner) update() { + justStarted := true out: for { select { case block := <-self.c: - self.quitCurrentOp <- struct{}{} + if justStarted { + justStarted = true + } else { + self.quitCurrentOp <- struct{}{} + } go self.mine(block) case <-self.quit: |