leveldb API changed for NewIterator. Fixes #20

This commit is contained in:
obscuren 2014-02-28 10:36:06 +01:00
parent e98b53bbef
commit c9f3d1c00b

View File

@ -54,13 +54,19 @@ func (db *LDBDatabase) LastKnownTD() []byte {
return data return data
} }
func (db *LDBDatabase) GetKeys() []*ethutil.Key {
data, _ := db.Get([]byte("KeyRing"))
return []*ethutil.Key{ethutil.NewKeyFromBytes(data)}
}
func (db *LDBDatabase) Close() { func (db *LDBDatabase) Close() {
// Close the leveldb database // Close the leveldb database
db.db.Close() db.db.Close()
} }
func (db *LDBDatabase) Print() { func (db *LDBDatabase) Print() {
iter := db.db.NewIterator(nil) iter := db.db.NewIterator(nil, nil)
for iter.Next() { for iter.Next() {
key := iter.Key() key := iter.Key()
value := iter.Value() value := iter.Value()