@@ -18,7 +18,6 @@ import (
18
18
clinode "github.com/filecoin-project/boost/cli/node"
19
19
boostclient "github.com/filecoin-project/boost/client"
20
20
"github.com/filecoin-project/boost/datatransfer"
21
- "github.com/filecoin-project/boost/markets/utils"
22
21
"github.com/filecoin-project/boost/node"
23
22
"github.com/filecoin-project/boost/node/config"
24
23
"github.com/filecoin-project/boost/node/modules/dtypes"
@@ -71,10 +70,7 @@ import (
71
70
ipldformat "github.com/ipfs/go-ipld-format"
72
71
logging "github.com/ipfs/go-log/v2"
73
72
"github.com/ipld/go-car"
74
- "github.com/ipld/go-ipld-prime"
75
73
"github.com/ipld/go-ipld-prime/datamodel"
76
- cidlink "github.com/ipld/go-ipld-prime/linking/cid"
77
- "github.com/ipld/go-ipld-prime/traversal"
78
74
"github.com/libp2p/go-libp2p"
79
75
"github.com/libp2p/go-libp2p/core/host"
80
76
"github.com/libp2p/go-libp2p/core/peer"
@@ -843,32 +839,32 @@ func (f *TestFramework) Retrieve(ctx context.Context, t *testing.T, tempdir stri
843
839
dservOffline := dag .NewDAGService (blockservice .New (bstore , offline .Exchange (bstore )))
844
840
845
841
// if we used a selector - need to find the sub-root the user actually wanted to retrieve
846
- if selectorNode != nil {
847
- if ! selectorNode .IsNull () {
848
- var subRootFound bool
849
- err := utils .TraverseDag (
850
- ctx ,
851
- dservOffline ,
852
- root ,
853
- selectorNode ,
854
- func (p traversal.Progress , n ipld.Node , r traversal.VisitReason ) error {
855
- if r == traversal .VisitReason_SelectionMatch {
856
-
857
- require .Equal (t , p .LastBlock .Path .String (), p .Path .String ())
858
-
859
- cidLnk , castOK := p .LastBlock .Link .(cidlink.Link )
860
- require .True (t , castOK )
861
-
862
- root = cidLnk .Cid
863
- subRootFound = true
864
- }
865
- return nil
866
- },
867
- )
868
- require .NoError (t , err )
869
- require .True (t , subRootFound )
870
- }
871
- }
842
+ // if selectorNode != nil {
843
+ // if !selectorNode.IsNull() {
844
+ // var subRootFound bool
845
+ // err := utils.TraverseDag(
846
+ // ctx,
847
+ // dservOffline,
848
+ // root,
849
+ // selectorNode,
850
+ // func(p traversal.Progress, n ipld.Node, r traversal.VisitReason) error {
851
+ // if r == traversal.VisitReason_SelectionMatch {
852
+
853
+ // require.Equal(t, p.LastBlock.Path.String(), p.Path.String())
854
+
855
+ // cidLnk, castOK := p.LastBlock.Link.(cidlink.Link)
856
+ // require.True(t, castOK)
857
+
858
+ // root = cidLnk.Cid
859
+ // subRootFound = true
860
+ // }
861
+ // return nil
862
+ // },
863
+ // )
864
+ // require.NoError(t, err)
865
+ // require.True(t, subRootFound)
866
+ // }
867
+ // }
872
868
873
869
dnode , err := dservOffline .Get (ctx , root )
874
870
require .NoError (t , err )
0 commit comments