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

Commit 06784ab

Browse files
committed
resolve FIXME
1 parent 737e98c commit 06784ab

File tree

1 file changed

+0
-17
lines changed

1 file changed

+0
-17
lines changed

hamt/hamt.go

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -352,23 +352,6 @@ func (ds *Shard) EnumLinksAsync(ctx context.Context) <-chan format.LinkResult {
352352
defer cancel()
353353
getLinks := makeAsyncTrieGetLinks(ds.dserv, linkResults)
354354
cset := cid.NewSet()
355-
// FIXME: The `dag.Walk` interface depends on the CID of the root of
356-
// the DAG being traversed.
357-
// When this function is called from `io.sizeBelowThreshold` we may
358-
// not have that available (as the directory has changed and the last
359-
// CID from which the `io.HAMTDirectory` was loaded from, if any, might
360-
// be outdated).
361-
// Ideally we would need to extend the DAG walk function to handle Shards
362-
// and not IPLD nodes. (See https://github.com/ipfs/go-ipld-format/blob/master/walker.go
363-
// as an example of a more generic walker that doesn't necessarily depend
364-
// on IPLD nodes and CIDs, although it may not be the correct choice here.)
365-
//
366-
// For the moment, to make the current PR tests pass, we force the Shards
367-
// to serialize to an IPLD node to extract its CID for the `Walk` API,
368-
// but this of course means fetching all the shards in the directory
369-
// beforehand which is exactly what we don't want (defeating the initial
370-
// purpose of the `io.sizeBelowThreshold` that tries to retrieve as little
371-
// shards as possible).
372355
rootNode, err := ds.Node()
373356
if err != nil {
374357
emitResult(ctx, linkResults, format.LinkResult{Link: nil, Err: err})

0 commit comments

Comments
 (0)