miner: exit loop when downloader Done or Failed
Following the logic of the comment at the method,
this fixes a regression introduced at 7cf56d6f06
, which would allow external parties to DoS with
blocks, preventing mining progress.
Signed-off-by: meows <b5c6@protonmail.com>
This commit is contained in:
@@ -111,6 +111,8 @@ func (miner *Miner) update() {
|
||||
miner.SetEtherbase(miner.coinbase)
|
||||
miner.worker.start()
|
||||
}
|
||||
// stop immediately and ignore all further pending events
|
||||
return
|
||||
}
|
||||
case addr := <-miner.startCh:
|
||||
if canStart {
|
||||
|
||||
Reference in New Issue
Block a user