Skip to content

Commit

Permalink
Revert "core/state: check err for iter.Error in fastDeleteStorage (et…
Browse files Browse the repository at this point in the history
…hereum#28122)"

This reverts commit 815cd64.
  • Loading branch information
devopsbo3 authored Nov 10, 2023
1 parent ddd051b commit ea66a81
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/state/statedb.go
Original file line number Diff line number Diff line change
Expand Up @@ -973,7 +973,7 @@ func (s *StateDB) fastDeleteStorage(addrHash common.Hash, root common.Hash) (boo
return true, size, nil, nil, nil
}
slot := common.CopyBytes(iter.Slot())
if err := iter.Error(); err != nil { // error might occur after Slot function
if iter.Error() != nil { // error might occur after Slot function
return false, 0, nil, nil, err
}
size += common.StorageSize(common.HashLength + len(slot))
Expand All @@ -983,7 +983,7 @@ func (s *StateDB) fastDeleteStorage(addrHash common.Hash, root common.Hash) (boo
return false, 0, nil, nil, err
}
}
if err := iter.Error(); err != nil { // error might occur during iteration
if iter.Error() != nil { // error might occur during iteration
return false, 0, nil, nil, err
}
if stack.Hash() != root {
Expand Down

0 comments on commit ea66a81

Please sign in to comment.