diff --git a/core/state/trie_prefetcher.go b/core/state/trie_prefetcher.go index 1cb162a480..f670c4dfbb 100644 --- a/core/state/trie_prefetcher.go +++ b/core/state/trie_prefetcher.go @@ -290,6 +290,8 @@ func (sf *subfetcher) schedule(addrs []common.Address, slots []common.Hash, read select { case sf.tasks <- tasks: return nil + case <-sf.stop: + return errTerminated // imminently so no need to wait for sf.term case <-sf.term: return errTerminated }