Skip to content

Commit 7d7221f

Browse files
committed
comment out dag traversal, we get: deal rejected: incorrect selector for this proposal
1 parent a98b0d7 commit 7d7221f

File tree

1 file changed

+26
-30
lines changed

1 file changed

+26
-30
lines changed

itests/framework/framework.go

+26-30
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ import (
1818
clinode "github.com/filecoin-project/boost/cli/node"
1919
boostclient "github.com/filecoin-project/boost/client"
2020
"github.com/filecoin-project/boost/datatransfer"
21-
"github.com/filecoin-project/boost/markets/utils"
2221
"github.com/filecoin-project/boost/node"
2322
"github.com/filecoin-project/boost/node/config"
2423
"github.com/filecoin-project/boost/node/modules/dtypes"
@@ -71,10 +70,7 @@ import (
7170
ipldformat "github.com/ipfs/go-ipld-format"
7271
logging "github.com/ipfs/go-log/v2"
7372
"github.com/ipld/go-car"
74-
"github.com/ipld/go-ipld-prime"
7573
"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"
7874
"github.com/libp2p/go-libp2p"
7975
"github.com/libp2p/go-libp2p/core/host"
8076
"github.com/libp2p/go-libp2p/core/peer"
@@ -843,32 +839,32 @@ func (f *TestFramework) Retrieve(ctx context.Context, t *testing.T, tempdir stri
843839
dservOffline := dag.NewDAGService(blockservice.New(bstore, offline.Exchange(bstore)))
844840

845841
// 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+
//}
872868

873869
dnode, err := dservOffline.Get(ctx, root)
874870
require.NoError(t, err)

0 commit comments

Comments
 (0)