Skip to content

Commit 5eb68df

Browse files
committed
refactor!: remove <-sf.stop case in task loop
1 parent 2553546 commit 5eb68df

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

core/state/trie_prefetcher.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -339,14 +339,14 @@ func (sf *subfetcher) loop() {
339339
sf.lock.Unlock()
340340

341341
// Prefetch any tasks until the loop is interrupted
342-
for i, task := range tasks {
342+
for _, task := range tasks {
343343
select {
344-
case <-sf.stop:
345-
// If termination is requested, add any leftover back and return
346-
sf.lock.Lock()
347-
sf.tasks = append(sf.tasks, tasks[i:]...)
348-
sf.lock.Unlock()
349-
return
344+
//libevm:start
345+
//
346+
// The <-sf.stop case has been removed, in keeping with the equivalent change below. Future geth
347+
// versions also remove it so our modification here can be undone when merging upstream.
348+
//
349+
//libevm:end
350350

351351
case ch := <-sf.copy:
352352
// Somebody wants a copy of the current trie, grant them

0 commit comments

Comments
 (0)