diff --git a/ethdb/memorydb/memorydb.go b/ethdb/memorydb/memorydb.go index 7e4fd7e5e..6ca7ce7d9 100644 --- a/ethdb/memorydb/memorydb.go +++ b/ethdb/memorydb/memorydb.go @@ -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) }