Unverified Commit d17ec0ea authored by ucwong's avatar ucwong Committed by GitHub

ethdb/memorydb: init map with known size (#27241)

ethdb:init map with known size
parent c8b0afb2
......@@ -342,7 +342,7 @@ func newSnapshot(db *Database) *snapshot {
db.lock.RLock()
defer db.lock.RUnlock()
copied := make(map[string][]byte)
copied := make(map[string][]byte, len(db.db))
for key, val := range db.db {
copied[key] = common.CopyBytes(val)
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment