diff options
author | obscuren <geffobscura@gmail.com> | 2014-02-28 17:36:06 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2014-02-28 17:36:06 +0800 |
commit | c9f3d1c00ba70016be4bb871f9ecd50d456c6985 (patch) | |
tree | 5b2cd2a1b129f6fb5e4012465935ff4bddba05c8 /ethdb/database.go | |
parent | e98b53bbef8cdbeed54546c75d856d53810e424c (diff) | |
download | dexon-c9f3d1c00ba70016be4bb871f9ecd50d456c6985.tar.gz dexon-c9f3d1c00ba70016be4bb871f9ecd50d456c6985.tar.zst dexon-c9f3d1c00ba70016be4bb871f9ecd50d456c6985.zip |
leveldb API changed for NewIterator. Fixes #20
Diffstat (limited to 'ethdb/database.go')
-rw-r--r-- | ethdb/database.go | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/ethdb/database.go b/ethdb/database.go index d1967f023..3dbff36de 100644 --- a/ethdb/database.go +++ b/ethdb/database.go @@ -54,13 +54,19 @@ func (db *LDBDatabase) LastKnownTD() []byte { return data } +func (db *LDBDatabase) GetKeys() []*ethutil.Key { + data, _ := db.Get([]byte("KeyRing")) + + return []*ethutil.Key{ethutil.NewKeyFromBytes(data)} +} + func (db *LDBDatabase) Close() { // Close the leveldb database db.db.Close() } func (db *LDBDatabase) Print() { - iter := db.db.NewIterator(nil) + iter := db.db.NewIterator(nil, nil) for iter.Next() { key := iter.Key() value := iter.Value() |