diff options
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")) |