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,13 +62,14 @@ func (self *Miner) update() {
if shouldStart { if shouldStart {
self.Start(self.coinbase, self.threads) self.Start(self.coinbase, self.threads)
} }
}
// unsubscribe. we're only interested in this event once // unsubscribe. we're only interested in this event once
events.Unsubscribe() events.Unsubscribe()
// stop immediately and ignore all further pending events // stop immediately and ignore all further pending events
break break
} }
} }
}
func (m *Miner) SetGasPrice(price *big.Int) { func (m *Miner) SetGasPrice(price *big.Int) {
// FIXME block tests set a nil gas price. Quick dirty fix // FIXME block tests set a nil gas price. Quick dirty fix