core/state: filter out nil trie for copy (#25575)

pull/25661/head
rjl493456442 2 years ago committed by GitHub
parent d79bd2f0f6
commit d46184c969
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      core/state/trie_prefetcher.go

@ -126,6 +126,9 @@ func (p *triePrefetcher) copy() *triePrefetcher {
// If the prefetcher is already a copy, duplicate the data // If the prefetcher is already a copy, duplicate the data
if p.fetches != nil { if p.fetches != nil {
for root, fetch := range p.fetches { for root, fetch := range p.fetches {
if fetch == nil {
continue
}
copy.fetches[root] = p.db.CopyTrie(fetch) copy.fetches[root] = p.db.CopyTrie(fetch)
} }
return copy return copy

Loading…
Cancel
Save