From d46184c9694d9f3d28910880f588de3dcfca9e0c Mon Sep 17 00:00:00 2001 From: rjl493456442 Date: Thu, 1 Sep 2022 15:34:32 +0800 Subject: [PATCH] core/state: filter out nil trie for copy (#25575) --- core/state/trie_prefetcher.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/state/trie_prefetcher.go b/core/state/trie_prefetcher.go index 83e8966d4..678774a62 100644 --- a/core/state/trie_prefetcher.go +++ b/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 p.fetches != nil { for root, fetch := range p.fetches { + if fetch == nil { + continue + } copy.fetches[root] = p.db.CopyTrie(fetch) } return copy