Skip to content
This repository was archived by the owner on Jun 27, 2023. It is now read-only.

Commit 3738990

Browse files
committed
Add CID set tracking to shard enumeration
1 parent 48b0d61 commit 3738990

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

hamt/hamt.go

+4-1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ import (
2727
"sync"
2828

2929
dag "github.com/ipfs/go-merkledag"
30+
3031
format "github.com/ipfs/go-unixfs"
3132
upb "github.com/ipfs/go-unixfs/pb"
3233

@@ -401,7 +402,9 @@ func (ds *Shard) EnumLinks(ctx context.Context) ([]*ipld.Link, error) {
401402
return nil
402403
})
403404

404-
err := dag.EnumerateChildrenAsync(ctx, getLinks, ds.nd.Cid(), func(c cid.Cid) bool { return true })
405+
cset := cid.NewSet()
406+
407+
err := dag.EnumerateChildrenAsync(ctx, getLinks, ds.nd.Cid(), cset.Visit)
405408
return links, err
406409
}
407410

0 commit comments

Comments
 (0)