mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
try to ensure trie prefetcher finishes
This commit is contained in:
parent
9a158dd749
commit
398ea0a982
1 changed files with 4 additions and 4 deletions
|
|
@ -292,10 +292,6 @@ func (sf *subfetcher) loop() {
|
|||
tasks := sf.tasks
|
||||
sf.tasks = nil
|
||||
sf.lock.Unlock()
|
||||
if tasks == nil && !keepRunning {
|
||||
// No more tasks
|
||||
return
|
||||
}
|
||||
// Prefetch all tasks
|
||||
for _, task := range tasks {
|
||||
if _, ok := sf.seen[string(task)]; ok {
|
||||
|
|
@ -309,5 +305,9 @@ func (sf *subfetcher) loop() {
|
|||
}
|
||||
sf.seen[string(task)] = struct{}{}
|
||||
}
|
||||
|
||||
if !keepRunning {
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue