mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-05-17 21:46:36 +00:00
core/state: avoid unnecessary alloc in trie prefetcher (#23198)
This commit is contained in:
parent
58b0420a8a
commit
8fe47b0a0d
1 changed files with 2 additions and 3 deletions
|
|
@ -312,12 +312,11 @@ func (sf *subfetcher) loop() {
|
||||||
|
|
||||||
default:
|
default:
|
||||||
// No termination request yet, prefetch the next entry
|
// No termination request yet, prefetch the next entry
|
||||||
taskid := string(task)
|
if _, ok := sf.seen[string(task)]; ok {
|
||||||
if _, ok := sf.seen[taskid]; ok {
|
|
||||||
sf.dups++
|
sf.dups++
|
||||||
} else {
|
} else {
|
||||||
sf.trie.TryGet(task)
|
sf.trie.TryGet(task)
|
||||||
sf.seen[taskid] = struct{}{}
|
sf.seen[string(task)] = struct{}{}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue