@@ -352,23 +352,6 @@ func (ds *Shard) EnumLinksAsync(ctx context.Context) <-chan format.LinkResult {
352
352
defer cancel ()
353
353
getLinks := makeAsyncTrieGetLinks (ds .dserv , linkResults )
354
354
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).
372
355
rootNode , err := ds .Node ()
373
356
if err != nil {
374
357
emitResult (ctx , linkResults , format.LinkResult {Link : nil , Err : err })
0 commit comments