diff options
author | obscuren <geffobscura@gmail.com> | 2014-11-19 23:21:28 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2014-11-19 23:21:28 +0800 |
commit | 0f460ad26e864ae8b4c4cf99147c5b57a10f3be9 (patch) | |
tree | cd75d90107a450b02a36c0258bf404d2d2ddaaa7 /ethdb/memory_database.go | |
parent | e70529a97785012368e7e0d5b272cccab705e551 (diff) | |
download | go-tangerine-0f460ad26e864ae8b4c4cf99147c5b57a10f3be9.tar.gz go-tangerine-0f460ad26e864ae8b4c4cf99147c5b57a10f3be9.tar.zst go-tangerine-0f460ad26e864ae8b4c4cf99147c5b57a10f3be9.zip |
Added caching and database interface to trie
* Reimplemented caching for trie
* Reimplemented resetting and persisting trie
Diffstat (limited to 'ethdb/memory_database.go')
-rw-r--r-- | ethdb/memory_database.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ethdb/memory_database.go b/ethdb/memory_database.go index 459373eea..48aa830e7 100644 --- a/ethdb/memory_database.go +++ b/ethdb/memory_database.go @@ -23,6 +23,10 @@ func (db *MemDatabase) Put(key []byte, value []byte) { db.db[string(key)] = value } +func (db *MemDatabase) Set(key []byte, value []byte) { + db.Put(key, value) +} + func (db *MemDatabase) Get(key []byte) ([]byte, error) { return db.db[string(key)], nil } |