aboutsummaryrefslogtreecommitdiffstats
path: root/ethdb
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-11-19 23:21:28 +0800
committerobscuren <geffobscura@gmail.com>2014-11-19 23:21:28 +0800
commit0f460ad26e864ae8b4c4cf99147c5b57a10f3be9 (patch)
treecd75d90107a450b02a36c0258bf404d2d2ddaaa7 /ethdb
parente70529a97785012368e7e0d5b272cccab705e551 (diff)
downloaddexon-0f460ad26e864ae8b4c4cf99147c5b57a10f3be9.tar
dexon-0f460ad26e864ae8b4c4cf99147c5b57a10f3be9.tar.gz
dexon-0f460ad26e864ae8b4c4cf99147c5b57a10f3be9.tar.bz2
dexon-0f460ad26e864ae8b4c4cf99147c5b57a10f3be9.tar.lz
dexon-0f460ad26e864ae8b4c4cf99147c5b57a10f3be9.tar.xz
dexon-0f460ad26e864ae8b4c4cf99147c5b57a10f3be9.tar.zst
dexon-0f460ad26e864ae8b4c4cf99147c5b57a10f3be9.zip
Added caching and database interface to trie
* Reimplemented caching for trie * Reimplemented resetting and persisting trie
Diffstat (limited to 'ethdb')
-rw-r--r--ethdb/memory_database.go4
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
}