eth/protocols/snap: check storage root existence for hash scheme (#29341)

pull/29364/head
rjl493456442 8 months ago committed by GitHub
parent da7469e5c4
commit 304879da20
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 2
      eth/protocols/snap/sync.go

@ -2201,7 +2201,7 @@ func (s *Syncer) processStorageResponse(res *storageResponse) {
// If the chunk's root is an overflown but full delivery, // If the chunk's root is an overflown but full delivery,
// clear the heal request. // clear the heal request.
accountHash := res.accounts[len(res.accounts)-1] accountHash := res.accounts[len(res.accounts)-1]
if root == res.subTask.root && rawdb.HasStorageTrieNode(s.db, accountHash, nil, root) { if root == res.subTask.root && rawdb.HasTrieNode(s.db, accountHash, nil, root, s.scheme) {
for i, account := range res.mainTask.res.hashes { for i, account := range res.mainTask.res.hashes {
if account == accountHash { if account == accountHash {
res.mainTask.needHeal[i] = false res.mainTask.needHeal[i] = false

Loading…
Cancel
Save