mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-02-26 07:37:20 +00:00
ethdb/leveldb: check iterator error in Database.DeleteRange (#32384)
Add missing it.Error() check after iteration in Database.DeleteRange to avoid silently ignoring iterator errors before writing the batch. Aligns behavior with batch.DeleteRange, which already validates iterator errors. No other functional changes; existing tests pass (TestLevelDB).
This commit is contained in:
parent
8ba1c791bf
commit
18b4ee5972
1 changed files with 3 additions and 0 deletions
|
|
@ -233,6 +233,9 @@ func (db *Database) DeleteRange(start, end []byte) error {
|
|||
return err
|
||||
}
|
||||
}
|
||||
if err := it.Error(); err != nil {
|
||||
return err
|
||||
}
|
||||
return batch.Write()
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue