Skip to content

Commit 08379b5

Browse files
authored
trie: remove the duplicate batch-write for 'preimage' (#23001)
1 parent 92b8f28 commit 08379b5

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

trie/database.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -703,12 +703,6 @@ func (db *Database) Commit(node common.Hash, report bool, callback func(common.H
703703
// Move all of the accumulated preimages into a write batch
704704
if db.preimages != nil {
705705
rawdb.WritePreimages(batch, db.preimages)
706-
if batch.ValueSize() > ethdb.IdealBatchSize {
707-
if err := batch.Write(); err != nil {
708-
return err
709-
}
710-
batch.Reset()
711-
}
712706
// Since we're going to replay trie node writes into the clean cache, flush out
713707
// any batched pre-images before continuing.
714708
if err := batch.Write(); err != nil {

0 commit comments

Comments
 (0)