aboutsummaryrefslogtreecommitdiffstats
path: root/ethdb
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-02-28 17:36:06 +0800
committerobscuren <geffobscura@gmail.com>2014-02-28 17:36:06 +0800
commitc9f3d1c00ba70016be4bb871f9ecd50d456c6985 (patch)
tree5b2cd2a1b129f6fb5e4012465935ff4bddba05c8 /ethdb
parente98b53bbef8cdbeed54546c75d856d53810e424c (diff)
downloaddexon-c9f3d1c00ba70016be4bb871f9ecd50d456c6985.tar.gz
dexon-c9f3d1c00ba70016be4bb871f9ecd50d456c6985.tar.zst
dexon-c9f3d1c00ba70016be4bb871f9ecd50d456c6985.zip
leveldb API changed for NewIterator. Fixes #20
Diffstat (limited to 'ethdb')
-rw-r--r--ethdb/database.go8
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()