mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-23 05:06:43 +00:00
wait for a downloader done/failed event before breaking the miner update loop
This commit is contained in:
parent
8c25a83708
commit
88c7f2b249
1 changed files with 5 additions and 4 deletions
|
|
@ -62,12 +62,13 @@ 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) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue