Skip to content

Commit 48fdb79

Browse files
author
Darioush Jalali
authored
core/state: check err for iter.Error in fastDeleteStorage (#28122)
core/state: check err for iter.Error
1 parent 65a17c0 commit 48fdb79

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

core/state/statedb.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -973,7 +973,7 @@ func (s *StateDB) fastDeleteStorage(addrHash common.Hash, root common.Hash) (boo
973973
return true, size, nil, nil, nil
974974
}
975975
slot := common.CopyBytes(iter.Slot())
976-
if iter.Error() != nil { // error might occur after Slot function
976+
if err := iter.Error(); err != nil { // error might occur after Slot function
977977
return false, 0, nil, nil, err
978978
}
979979
size += common.StorageSize(common.HashLength + len(slot))
@@ -983,7 +983,7 @@ func (s *StateDB) fastDeleteStorage(addrHash common.Hash, root common.Hash) (boo
983983
return false, 0, nil, nil, err
984984
}
985985
}
986-
if iter.Error() != nil { // error might occur during iteration
986+
if err := iter.Error(); err != nil { // error might occur during iteration
987987
return false, 0, nil, nil, err
988988
}
989989
if stack.Hash() != root {

0 commit comments

Comments
 (0)