aboutsummaryrefslogtreecommitdiffstats
path: root/miner
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2015-05-15 21:30:34 +0800
committerobscuren <geffobscura@gmail.com>2015-05-16 02:26:15 +0800
commit5cec1aad152115502f8ba0d7fcc1c3e40b915d7a (patch)
tree453ade99aaef0c65bf9c62c3699c2cde0a2344ea /miner
parent82c0780f81bef8c88db9dff4bb34917f2934c71d (diff)
downloadgo-tangerine-5cec1aad152115502f8ba0d7fcc1c3e40b915d7a.tar.gz
go-tangerine-5cec1aad152115502f8ba0d7fcc1c3e40b915d7a.tar.zst
go-tangerine-5cec1aad152115502f8ba0d7fcc1c3e40b915d7a.zip
core, miner: fork resolving and restart miner after sync op
Fork resolving fixes #940
Diffstat (limited to 'miner')
-rw-r--r--miner/miner.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/miner/miner.go b/miner/miner.go
index 359be4032..6c220b1a6 100644
--- a/miner/miner.go
+++ b/miner/miner.go
@@ -47,6 +47,7 @@ func (self *Miner) update() {
atomic.StoreInt32(&self.canStart, 0)
if self.Mining() {
self.Stop()
+ atomic.StoreInt32(&self.shouldStart, 1)
glog.V(logger.Info).Infoln("Mining operation aborted due to sync operation")
}
case downloader.DoneEvent, downloader.FailedEvent: