diff options
author | Péter Szilágyi <peterke@gmail.com> | 2015-07-03 00:55:18 +0800 |
---|---|---|
committer | Péter Szilágyi <peterke@gmail.com> | 2015-08-24 22:57:28 +0800 |
commit | 42f44dda5468000b3b2c005ec485529bc5da3674 (patch) | |
tree | c93c9a2734adceac75e48f825076d48325826140 /ethdb | |
parent | c51e153b5c5327f971e7b410e49e7babfc3f0b8e (diff) | |
download | dexon-42f44dda5468000b3b2c005ec485529bc5da3674.tar.gz dexon-42f44dda5468000b3b2c005ec485529bc5da3674.tar.zst dexon-42f44dda5468000b3b2c005ec485529bc5da3674.zip |
eth, eth/downloader: handle header requests, table driven proto tests
Diffstat (limited to 'ethdb')
-rw-r--r-- | ethdb/memory_database.go | 8 |
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")) |