Skip to content

Commit

Permalink
use NewKey over RawKey as it doesnt exist yet
Browse files Browse the repository at this point in the history
  • Loading branch information
whyrusleeping committed Nov 15, 2016
1 parent 1b4f407 commit b152b1e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions providers/providers.go
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ func writeProviderEntry(dstore ds.Datastore, k *cid.Cid, p peer.ID, t time.Time)
buf := make([]byte, 16)
n := binary.PutVarint(buf, t.UnixNano())

return dstore.Put(ds.RawKey(dsk), buf[:n])
return dstore.Put(ds.NewKey(dsk), buf[:n])
}

func (pm *ProviderManager) deleteProvSet(k *cid.Cid) error {
Expand All @@ -193,7 +193,7 @@ func (pm *ProviderManager) deleteProvSet(k *cid.Cid) error {
}

for _, e := range entries {
err := pm.dstore.Delete(ds.RawKey(e.Key))
err := pm.dstore.Delete(ds.NewKey(e.Key))
if err != nil {
log.Error("deleting provider set: ", err)
}
Expand Down

0 comments on commit b152b1e

Please sign in to comment.