core/state: avoid unnecessary alloc in trie prefetcher (#23198)

pull/23199/head
Marius van der Wijden 3 years ago committed by GitHub
parent 58b0420a8a
commit 8fe47b0a0d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      core/state/trie_prefetcher.go

@ -312,12 +312,11 @@ func (sf *subfetcher) loop() {
default:
// No termination request yet, prefetch the next entry
taskid := string(task)
if _, ok := sf.seen[taskid]; ok {
if _, ok := sf.seen[string(task)]; ok {
sf.dups++
} else {
sf.trie.TryGet(task)
sf.seen[taskid] = struct{}{}
sf.seen[string(task)] = struct{}{}
}
}
}

Loading…
Cancel
Save