Commit 7804ee2c authored by Juan Batiz-Benet's avatar Juan Batiz-Benet

Merge pull request #7 from ebuchman/master

fix leveldb iterator
parents 26729e38 5c7f7186
...@@ -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