mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-24 13:46:43 +00:00
cmd: opt with clear map
This commit is contained in:
parent
88922d2bf5
commit
0ad1ca2040
1 changed files with 1 additions and 1 deletions
|
|
@ -526,7 +526,7 @@ func ImportPreimages(db ethdb.Database, fn string) error {
|
||||||
preimages[crypto.Keccak256Hash(blob)] = common.CopyBytes(blob)
|
preimages[crypto.Keccak256Hash(blob)] = common.CopyBytes(blob)
|
||||||
if len(preimages) > 1024 {
|
if len(preimages) > 1024 {
|
||||||
rawdb.WritePreimages(db, preimages)
|
rawdb.WritePreimages(db, preimages)
|
||||||
preimages = make(map[common.Hash][]byte)
|
clear(preimages)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Flush the last batch preimage data
|
// Flush the last batch preimage data
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue