diff --git a/consensus/ethash/consensus.go b/consensus/ethash/consensus.go index a8692aaa9..97b92d5b1 100644 --- a/consensus/ethash/consensus.go +++ b/consensus/ethash/consensus.go @@ -146,7 +146,11 @@ func (ethash *Ethash) VerifyHeaders(chain consensus.ChainHeaderReader, headers [ defer wg.Done() for index := range inputs { errors[index] = ethash.verifyHeaderWorker(chain, headers, seals, index) - done <- index + select { + case done <- index: + case <-abort: + return + } } }() }