aboutsummaryrefslogtreecommitdiffstats
path: root/ethdb/memory_database.go
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2015-07-03 00:55:18 +0800
committerPéter Szilágyi <peterke@gmail.com>2015-08-24 22:57:28 +0800
commit42f44dda5468000b3b2c005ec485529bc5da3674 (patch)
treec93c9a2734adceac75e48f825076d48325826140 /ethdb/memory_database.go
parentc51e153b5c5327f971e7b410e49e7babfc3f0b8e (diff)
downloadgo-tangerine-42f44dda5468000b3b2c005ec485529bc5da3674.tar
go-tangerine-42f44dda5468000b3b2c005ec485529bc5da3674.tar.gz
go-tangerine-42f44dda5468000b3b2c005ec485529bc5da3674.tar.bz2
go-tangerine-42f44dda5468000b3b2c005ec485529bc5da3674.tar.lz
go-tangerine-42f44dda5468000b3b2c005ec485529bc5da3674.tar.xz
go-tangerine-42f44dda5468000b3b2c005ec485529bc5da3674.tar.zst
go-tangerine-42f44dda5468000b3b2c005ec485529bc5da3674.zip
eth, eth/downloader: handle header requests, table driven proto tests
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"))