Skip to content

Commit

Permalink
leveldb API changed for NewIterator. Fixes ethereum#20
Browse files Browse the repository at this point in the history
  • Loading branch information
obscuren committed Feb 28, 2014
1 parent e98b53b commit c9f3d1c
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion ethdb/database.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit c9f3d1c

Please sign in to comment.