aboutsummaryrefslogtreecommitdiffstats
path: root/ethdb/memory_database.go
diff options
context:
space:
mode:
authorFelix Lange <fjl@twurst.com>2015-08-27 06:03:59 +0800
committerFelix Lange <fjl@twurst.com>2015-08-27 06:03:59 +0800
commit6ec13e7e2bab1ebdb580819a48629055bbbb5fb3 (patch)
treecd23c3deac1a41b34a5157c1f7c5361ca56b4137 /ethdb/memory_database.go
parent79b644c7a35bbc835b7e78ddf8a31c37e69b0784 (diff)
parent17f65cd1e5e0fea6e4f7b96c60767aaa0ada366d (diff)
downloadgo-tangerine-6ec13e7e2bab1ebdb580819a48629055bbbb5fb3.tar
go-tangerine-6ec13e7e2bab1ebdb580819a48629055bbbb5fb3.tar.gz
go-tangerine-6ec13e7e2bab1ebdb580819a48629055bbbb5fb3.tar.bz2
go-tangerine-6ec13e7e2bab1ebdb580819a48629055bbbb5fb3.tar.lz
go-tangerine-6ec13e7e2bab1ebdb580819a48629055bbbb5fb3.tar.xz
go-tangerine-6ec13e7e2bab1ebdb580819a48629055bbbb5fb3.tar.zst
go-tangerine-6ec13e7e2bab1ebdb580819a48629055bbbb5fb3.zip
Merge pull request #1701 from karalabe/eth62-sync-rebase
eth: implement eth/62 synchronization logic
Diffstat (limited to 'ethdb/memory_database.go')
-rw-r--r--ethdb/memory_database.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/ethdb/memory_database.go b/ethdb/memory_database.go
index 70b03dfad..d50f8f9d4 100644
--- a/ethdb/memory_database.go
+++ b/ethdb/memory_database.go
@@ -49,6 +49,14 @@ func (db *MemDatabase) Get(key []byte) ([]byte, error) {
return db.db[string(key)], nil
}
+func (db *MemDatabase) Keys() [][]byte {
+ keys := [][]byte{}
+ for key, _ := range db.db {
+ keys = append(keys, []byte(key))
+ }
+ return keys
+}
+
/*
func (db *MemDatabase) GetKeys() []*common.Key {
data, _ := db.Get([]byte("KeyRing"))