Commit 5c7f7186 authored by Ethan Buchman's avatar Ethan Buchman

fix leveldb iterator

parent 088b4a54
...@@ -66,7 +66,7 @@ func (d *Datastore) Delete(key ds.Key) (err error) { ...@@ -66,7 +66,7 @@ func (d *Datastore) Delete(key ds.Key) (err error) {
func (d *Datastore) KeyList() ([]ds.Key, error) { func (d *Datastore) KeyList() ([]ds.Key, error) {
i := d.DB.NewIterator(nil, nil) i := d.DB.NewIterator(nil, nil)
var keys []ds.Key var keys []ds.Key
for ; i.Valid(); i.Next() { for i.Next() {
keys = append(keys, ds.NewKey(string(i.Key()))) keys = append(keys, ds.NewKey(string(i.Key())))
} }
return keys, nil return keys, nil
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment