Skip to content

Commit

Permalink
update with new boxo
Browse files Browse the repository at this point in the history
  • Loading branch information
hacdias committed Apr 9, 2024
1 parent 80231a6 commit 9434294
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 15 deletions.
11 changes: 5 additions & 6 deletions core/node/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -163,14 +163,13 @@ func newProvidingStrategy(onlyPinned, onlyRoots bool) interface{} {
return provider.NewPinnedProvider(true, in.Pinner, in.IPLDFetcher)
}

var later provider.KeyChanFunc
if onlyPinned {
later = provider.NewPinnedProvider(false, in.Pinner, in.IPLDFetcher)
} else {
later = provider.NewBlockstoreProvider(in.Blockstore)
return provider.NewPinnedProvider(false, in.Pinner, in.IPLDFetcher)
}

roots := provider.NewPinnedProvider(true, in.Pinner, in.IPLDFetcher)
return provider.NewPrioritizedProvider(roots, later)
return provider.NewPrioritizedProvider(
provider.NewPinnedProvider(true, in.Pinner, in.IPLDFetcher),
provider.NewBlockstoreProvider(in.Blockstore),
)
}
}
2 changes: 1 addition & 1 deletion docs/examples/kubo-as-a-library/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ toolchain go1.22.0
replace github.com/ipfs/kubo => ./../../..

require (
github.com/ipfs/boxo v0.18.1-0.20240404105922-3182484b86c8
github.com/ipfs/boxo v0.18.1-0.20240408152325-558d9c78084e
github.com/ipfs/kubo v0.0.0-00010101000000-000000000000
github.com/libp2p/go-libp2p v0.33.2
github.com/multiformats/go-multiaddr v0.12.3
Expand Down
4 changes: 2 additions & 2 deletions docs/examples/kubo-as-a-library/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -266,8 +266,8 @@ github.com/ipfs-shipyard/nopfs/ipfs v0.13.2-0.20231027223058-cde3b5ba964c h1:7Uy
github.com/ipfs-shipyard/nopfs/ipfs v0.13.2-0.20231027223058-cde3b5ba964c/go.mod h1:6EekK/jo+TynwSE/ZOiOJd4eEvRXoavEC3vquKtv4yI=
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.18.1-0.20240404105922-3182484b86c8 h1:3YJFMzYwdJNGd+YucvZ8cIDrhdZ7Ngb9JznK/7zm6+0=
github.com/ipfs/boxo v0.18.1-0.20240404105922-3182484b86c8/go.mod h1:V5gJzbIMwKEXrg3IdvAxIdF7UPgU4RsXmNGS8MQ/0D4=
github.com/ipfs/boxo v0.18.1-0.20240408152325-558d9c78084e h1:IsQoZp6trs8E8x1IkLeHwZ4d3bcUyciUpu6zw8Hv6DE=
github.com/ipfs/boxo v0.18.1-0.20240408152325-558d9c78084e/go.mod h1:V5gJzbIMwKEXrg3IdvAxIdF7UPgU4RsXmNGS8MQ/0D4=
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.3/go.mod h1:4LmD4ZUw0mhO+JSKdpWwrzATiEfM7WWgQ8H5l6P8MVk=
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ require (
github.com/hashicorp/go-multierror v1.1.1
github.com/ipfs-shipyard/nopfs v0.0.12
github.com/ipfs-shipyard/nopfs/ipfs v0.13.2-0.20231027223058-cde3b5ba964c
github.com/ipfs/boxo v0.18.1-0.20240404105922-3182484b86c8
github.com/ipfs/boxo v0.18.1-0.20240408152325-558d9c78084e
github.com/ipfs/go-block-format v0.2.0
github.com/ipfs/go-cid v0.4.1
github.com/ipfs/go-cidutil v0.1.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -329,8 +329,8 @@ github.com/ipfs-shipyard/nopfs/ipfs v0.13.2-0.20231027223058-cde3b5ba964c h1:7Uy
github.com/ipfs-shipyard/nopfs/ipfs v0.13.2-0.20231027223058-cde3b5ba964c/go.mod h1:6EekK/jo+TynwSE/ZOiOJd4eEvRXoavEC3vquKtv4yI=
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.18.1-0.20240404105922-3182484b86c8 h1:3YJFMzYwdJNGd+YucvZ8cIDrhdZ7Ngb9JznK/7zm6+0=
github.com/ipfs/boxo v0.18.1-0.20240404105922-3182484b86c8/go.mod h1:V5gJzbIMwKEXrg3IdvAxIdF7UPgU4RsXmNGS8MQ/0D4=
github.com/ipfs/boxo v0.18.1-0.20240408152325-558d9c78084e h1:IsQoZp6trs8E8x1IkLeHwZ4d3bcUyciUpu6zw8Hv6DE=
github.com/ipfs/boxo v0.18.1-0.20240408152325-558d9c78084e/go.mod h1:V5gJzbIMwKEXrg3IdvAxIdF7UPgU4RsXmNGS8MQ/0D4=
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-bitswap v0.11.0 h1:j1WVvhDX1yhG32NTC9xfxnqycqYIlhzEzLXG/cU1HyQ=
Expand Down
2 changes: 1 addition & 1 deletion test/dependencies/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ require (
github.com/hexops/gotextdiff v1.0.3 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/ipfs/bbloom v0.0.4 // indirect
github.com/ipfs/boxo v0.18.1-0.20240404105922-3182484b86c8 // indirect
github.com/ipfs/boxo v0.18.1-0.20240408152325-558d9c78084e // indirect
github.com/ipfs/go-block-format v0.2.0 // indirect
github.com/ipfs/go-cid v0.4.1 // indirect
github.com/ipfs/go-datastore v0.6.0 // indirect
Expand Down
4 changes: 2 additions & 2 deletions test/dependencies/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -362,8 +362,8 @@ github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2
github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw=
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.18.1-0.20240404105922-3182484b86c8 h1:3YJFMzYwdJNGd+YucvZ8cIDrhdZ7Ngb9JznK/7zm6+0=
github.com/ipfs/boxo v0.18.1-0.20240404105922-3182484b86c8/go.mod h1:V5gJzbIMwKEXrg3IdvAxIdF7UPgU4RsXmNGS8MQ/0D4=
github.com/ipfs/boxo v0.18.1-0.20240408152325-558d9c78084e h1:IsQoZp6trs8E8x1IkLeHwZ4d3bcUyciUpu6zw8Hv6DE=
github.com/ipfs/boxo v0.18.1-0.20240408152325-558d9c78084e/go.mod h1:V5gJzbIMwKEXrg3IdvAxIdF7UPgU4RsXmNGS8MQ/0D4=
github.com/ipfs/go-block-format v0.2.0 h1:ZqrkxBA2ICbDRbK8KJs/u0O3dlp6gmAuuXUJNiW1Ycs=
github.com/ipfs/go-block-format v0.2.0/go.mod h1:+jpL11nFx5A/SPpsoBn6Bzkra/zaArfSmsknbPMYgzM=
github.com/ipfs/go-cid v0.4.1 h1:A/T3qGvxi4kpKWWcPC/PgbvDA2bjVLO7n4UeVwnbs/s=
Expand Down

0 comments on commit 9434294

Please sign in to comment.