From b94b29b8d0764c98b8c3cebba59892d3614dff71 Mon Sep 17 00:00:00 2001 From: Daniel Liu <139250065@qq.com> Date: Tue, 20 May 2025 15:13:34 +0800 Subject: [PATCH] trie: check nil bloom (#1039) --- trie/sync.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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