diff --git a/trie/sync.go b/trie/sync.go index f34cf4d68e..9c14c7f72b 100644 --- a/trie/sync.go +++ b/trie/sync.go @@ -156,7 +156,7 @@ func (s *Sync) AddCodeEntry(hash common.Hash, depth int, parent common.Hash) { if s.membatch.hasCode(hash) { return } - if s.bloom.Contains(hash[:]) { + if s.bloom == nil || s.bloom.Contains(hash[:]) { // Bloom filter says this might be a duplicate, double check. // If database says yes, the blob is present for sure. // Note we only check the existence with new code scheme, fast