aboutsummaryrefslogtreecommitdiffstats
path: root/trie/sync.go
diff options
context:
space:
mode:
Diffstat (limited to 'trie/sync.go')
-rw-r--r--trie/sync.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/trie/sync.go b/trie/sync.go
index 1e4f8d87c..fea10051f 100644
--- a/trie/sync.go
+++ b/trie/sync.go
@@ -138,7 +138,7 @@ func (s *TrieSync) AddRawEntry(hash common.Hash, depth int, parent common.Hash)
if _, ok := s.membatch.batch[hash]; ok {
return
}
- if blob, _ := s.database.Get(hash.Bytes()); blob != nil {
+ if ok, _ := s.database.Has(hash.Bytes()); ok {
return
}
// Assemble the new sub-trie sync request
@@ -296,8 +296,7 @@ func (s *TrieSync) children(req *request, object node) ([]*request, error) {
if _, ok := s.membatch.batch[hash]; ok {
continue
}
- blob, _ := s.database.Get(node)
- if local, err := decodeNode(node[:], blob, 0); local != nil && err == nil {
+ if ok, _ := s.database.Has(node); ok {
continue
}
// Locally unknown node, schedule for retrieval