cmd: opt with clear map

This commit is contained in:
cuiweixie 2025-08-15 18:50:00 +08:00
parent 88922d2bf5
commit 0ad1ca2040

View file

@ -526,7 +526,7 @@ func ImportPreimages(db ethdb.Database, fn string) error {
preimages[crypto.Keccak256Hash(blob)] = common.CopyBytes(blob)
if len(preimages) > 1024 {
rawdb.WritePreimages(db, preimages)
preimages = make(map[common.Hash][]byte)
clear(preimages)
}
}
// Flush the last batch preimage data