Skip to content

Commit

Permalink
removed unused method
Browse files Browse the repository at this point in the history
  • Loading branch information
ehsan6sha committed Nov 19, 2023
1 parent 994c709 commit fd78a9c
Showing 1 changed file with 0 additions and 28 deletions.
28 changes: 0 additions & 28 deletions mobile/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,31 +116,3 @@ func (c *Client) listRecentCidsAsString(ctx context.Context) ([]string, error) {
}
return links, nil
}

func (c *Client) listRecentCids(ctx context.Context) ([]ipld.Link, error) {
q := query.Query{
KeysOnly: true,
Prefix: recentCidKeyPrefix.String(),
}
results, err := c.ds.Query(ctx, q)
if err != nil {
return nil, err
}
defer results.Close()
var links []ipld.Link
for r := range results.Next() {
if ctx.Err() != nil {
return nil, ctx.Err()
}
if r.Error != nil {
return nil, r.Error
}
key := datastore.RawKey(r.Key)
c, err := cid.Decode(key.BaseNamespace())
if err != nil {
return nil, err
}
links = append(links, cidlink.Link{Cid: c})
}
return links, nil
}

0 comments on commit fd78a9c

Please sign in to comment.