trie: remove the duplicate batch-write for 'preimage' (#23001)
This commit is contained in:
parent
92b8f28df3
commit
08379b5533
@ -703,12 +703,6 @@ func (db *Database) Commit(node common.Hash, report bool, callback func(common.H
|
|||||||
// Move all of the accumulated preimages into a write batch
|
// Move all of the accumulated preimages into a write batch
|
||||||
if db.preimages != nil {
|
if db.preimages != nil {
|
||||||
rawdb.WritePreimages(batch, db.preimages)
|
rawdb.WritePreimages(batch, db.preimages)
|
||||||
if batch.ValueSize() > ethdb.IdealBatchSize {
|
|
||||||
if err := batch.Write(); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
batch.Reset()
|
|
||||||
}
|
|
||||||
// Since we're going to replay trie node writes into the clean cache, flush out
|
// Since we're going to replay trie node writes into the clean cache, flush out
|
||||||
// any batched pre-images before continuing.
|
// any batched pre-images before continuing.
|
||||||
if err := batch.Write(); err != nil {
|
if err := batch.Write(); err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user