diff --git a/go.mod b/go.mod index ad5e6d93..1b8b2b35 100644 --- a/go.mod +++ b/go.mod @@ -10,7 +10,7 @@ require ( github.com/filecoin-project/go-state-types v0.10.0 github.com/google/uuid v1.3.0 github.com/hannahhoward/go-pubsub v1.0.0 - github.com/ipfs/boxo v0.15.0 + github.com/ipfs/boxo v0.16.1-0.20231229020421-6a85bee732d0 github.com/ipfs/go-block-format v0.2.0 github.com/ipfs/go-cid v0.4.1 github.com/ipfs/go-datastore v0.6.0 @@ -89,6 +89,7 @@ require ( github.com/huin/goupnp v1.3.0 // indirect github.com/ipfs/bbloom v0.0.4 // indirect github.com/ipfs/go-bitfield v1.1.0 // indirect + github.com/ipfs/go-cidutil v0.1.0 // indirect github.com/ipfs/go-ipfs-chunker v0.0.5 // indirect github.com/ipfs/go-ipfs-ds-help v1.1.0 // indirect github.com/ipfs/go-ipfs-pq v0.0.3 // indirect diff --git a/go.sum b/go.sum index 48e21ae9..fb799dd7 100644 --- a/go.sum +++ b/go.sum @@ -234,8 +234,8 @@ github.com/huin/goupnp v1.3.0/go.mod h1:gnGPsThkYa7bFi/KWmEysQRf48l2dvR5bxr2OFck github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ipfs/bbloom v0.0.4 h1:Gi+8EGJ2y5qiD5FbsbpX/TMNcJw8gSqr7eyjHa4Fhvs= github.com/ipfs/bbloom v0.0.4/go.mod h1:cS9YprKXpoZ9lT0n/Mw/a6/aFV6DTjTLYHeA+gyqMG0= -github.com/ipfs/boxo v0.15.0 h1:BriLydj2nlK1nKeJQHxcKSuG5ZXcoutzhBklOtxC5pk= -github.com/ipfs/boxo v0.15.0/go.mod h1:X5ulcbR5Nh7sm3Db8+08AApUo6FsGC5mb23QDKAoB/M= +github.com/ipfs/boxo v0.16.1-0.20231229020421-6a85bee732d0 h1:h7NEIS3d+NlkTmNLnvWRrLCUGx3dJ1auD34OTlEqqwA= +github.com/ipfs/boxo v0.16.1-0.20231229020421-6a85bee732d0/go.mod h1:jAgpNQn7T7BnibUeReXcKU9Ha1xmYNyOlwVEl193ow0= github.com/ipfs/go-bitfield v1.1.0 h1:fh7FIo8bSwaJEh6DdTWbCeZ1eqOaOkKFI74SCnsWbGA= github.com/ipfs/go-bitfield v1.1.0/go.mod h1:paqf1wjq/D2BBmzfTVFlJQ9IlFOZpg422HL0HqsGWHU= github.com/ipfs/go-block-format v0.0.2/go.mod h1:AWR46JfpcObNfg3ok2JHDUfdiHRgWhJgCQF+KIgOPJY= @@ -254,6 +254,8 @@ github.com/ipfs/go-cid v0.0.7/go.mod h1:6Ux9z5e+HpkQdckYoX1PG/6xqKspzlEIR5SDmgqg github.com/ipfs/go-cid v0.2.0/go.mod h1:P+HXFDF4CVhaVayiEb4wkAy7zBHxBwsJyt0Y5U6MLro= github.com/ipfs/go-cid v0.4.1 h1:A/T3qGvxi4kpKWWcPC/PgbvDA2bjVLO7n4UeVwnbs/s= github.com/ipfs/go-cid v0.4.1/go.mod h1:uQHwDeX4c6CtyrFwdqyhpNcxVewur1M7l7fNU7LKwZk= +github.com/ipfs/go-cidutil v0.1.0 h1:RW5hO7Vcf16dplUU60Hs0AKDkQAVPVplr7lk97CFL+Q= +github.com/ipfs/go-cidutil v0.1.0/go.mod h1:e7OEVBMIv9JaOxt9zaGEmAoSlXW9jdFZ5lP/0PwcfpA= github.com/ipfs/go-datastore v0.1.1/go.mod h1:w38XXW9kVFNp57Zj5knbKWM2T+KOZCGDRVNdgPHtbHw= github.com/ipfs/go-datastore v0.5.0/go.mod h1:9zhEApYMTl17C8YDp7JmU7sQZi2/wqiYh73hakZ90Bk= github.com/ipfs/go-datastore v0.5.1/go.mod h1:9zhEApYMTl17C8YDp7JmU7sQZi2/wqiYh73hakZ90Bk= diff --git a/pkg/internal/itest/testpeer/generator.go b/pkg/internal/itest/testpeer/generator.go index ba77c6dd..2c42d0c1 100644 --- a/pkg/internal/itest/testpeer/generator.go +++ b/pkg/internal/itest/testpeer/generator.go @@ -30,7 +30,6 @@ import ( "github.com/ipld/go-ipld-prime" "github.com/ipld/go-ipld-prime/linking" cidlink "github.com/ipld/go-ipld-prime/linking/cid" - routinghelpers "github.com/libp2p/go-libp2p-routing-helpers" tnet "github.com/libp2p/go-libp2p-testing/net" p2ptestutil "github.com/libp2p/go-libp2p-testing/netutil" "github.com/libp2p/go-libp2p/core/host" @@ -199,7 +198,7 @@ func NewTestBitswapPeer( if err != nil { return TestPeer{}, err } - bsNet := bsnet.NewFromIpfsHost(peer.Host, routinghelpers.Null{}, netOptions...) + bsNet := bsnet.NewFromIpfsHost(peer.Host, netOptions...) bs := server.New(ctx, bsNet, peer.blockstore, bsOptions...) bsNet.Start(bs) go func() { diff --git a/pkg/retriever/bitswapretriever.go b/pkg/retriever/bitswapretriever.go index 9f2e5e40..452ab970 100644 --- a/pkg/retriever/bitswapretriever.go +++ b/pkg/retriever/bitswapretriever.go @@ -83,8 +83,8 @@ func NewBitswapRetrieverFromHost( bstore := bitswaphelpers.NewMultiblockstore() inProgressCids := bitswaphelpers.NewInProgressCids() routing := bitswaphelpers.NewIndexerRouting(inProgressCids.Get) - bsnet := network.NewFromIpfsHost(host, routing) - bitswap := client.New(ctx, bsnet, bstore, client.ProviderSearchDelay(shortenedDelay)) + bsnet := network.NewFromIpfsHost(host) + bitswap := client.New(ctx, bsnet, bstore, client.ProviderSearchDelay(shortenedDelay), client.WithContentSearch(routing)) bsnet.Start(bitswap) bsrv := blockservice.New(bstore, bitswap) go func() {