good morning!!!!

Skip to content
Snippets Groups Projects
Commit d581dfee authored by Felix Lange's avatar Felix Lange
Browse files

ethdb: copy stored memdb values

Storing a value in LevelDB copies the bytes, modifying the value
afterwards does not affect the content of the database. This commit
ensures that MemDatabase satisfies the same property.
parent 8b32f10f
No related branches found
No related tags found
No related merge requests found
......@@ -36,8 +36,7 @@ func NewMemDatabase() (*MemDatabase, error) {
}
func (db *MemDatabase) Put(key []byte, value []byte) error {
db.db[string(key)] = value
db.db[string(key)] = common.CopyBytes(value)
return nil
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment