@@ -156,8 +156,7 @@ func (s *Sync) AddSubTrie(root common.Hash, path []byte, parent common.Hash, cal
156156 }
157157 // If database says this is a duplicate, then at least the trie node is
158158 // present, and we hold the assumption that it's NOT legacy contract code.
159- blob := rawdb .ReadTrieNode (s .database , root )
160- if len (blob ) > 0 {
159+ if rawdb .HasTrieNode (s .database , root ) {
161160 return
162161 }
163162 // Assemble the new sub-trie sync request
@@ -194,7 +193,7 @@ func (s *Sync) AddCodeEntry(hash common.Hash, path []byte, parent common.Hash) {
194193 // sync is expected to run with a fresh new node. Even there
195194 // exists the code with legacy format, fetch and store with
196195 // new scheme anyway.
197- if blob := rawdb .ReadCodeWithPrefix (s .database , hash ); len ( blob ) > 0 {
196+ if rawdb .HasCodeWithPrefix (s .database , hash ) {
198197 return
199198 }
200199 // Assemble the new sub-trie sync request
@@ -402,7 +401,7 @@ func (s *Sync) children(req *request, object node) ([]*request, error) {
402401 }
403402 // If database says duplicate, then at least the trie node is present
404403 // and we hold the assumption that it's NOT legacy contract code.
405- if blob := rawdb .ReadTrieNode (s .database , hash ); len ( blob ) > 0 {
404+ if rawdb .HasTrieNode (s .database , hash ) {
406405 continue
407406 }
408407 // Locally unknown Node, schedule for retrieval
0 commit comments