wait for a downloader done/failed event before breaking the miner update loop

This commit is contained in:
Bas van Kervel 2015-05-21 19:51:34 +02:00
parent 8c25a83708
commit 88c7f2b249

View file

@ -62,12 +62,13 @@ func (self *Miner) update() {
if shouldStart {
self.Start(self.coinbase, self.threads)
}
}
// unsubscribe. we're only interested in this event once
events.Unsubscribe()
// stop immediately and ignore all further pending events
break
}
}
}
func (m *Miner) SetGasPrice(price *big.Int) {