Skip to content

Commit

Permalink
fix fetcher initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
hsanjuan committed Oct 13, 2023
1 parent ca14733 commit 8f160d3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ import (
levelds "github.com/ipfs/go-ds-leveldb"
metri "github.com/ipfs/go-metrics-interface"
mprome "github.com/ipfs/go-metrics-prometheus"
"github.com/ipfs/go-unixfsnode"
dagpb "github.com/ipld/go-codec-dagpb"
"github.com/libp2p/go-libp2p"
dht "github.com/libp2p/go-libp2p-kad-dht"
"github.com/libp2p/go-libp2p-kad-dht/fullrt"
Expand Down Expand Up @@ -295,7 +297,9 @@ func Setup(ctx context.Context, cfg Config) (*Node, error) {
}
ns = nopfsipfs.WrapNameSystem(ns, blocker)

fetcher := bsfetcher.NewFetcherConfig(bsrv)
fetcherCfg := bsfetcher.NewFetcherConfig(bsrv)
fetcherCfg.PrototypeChooser = dagpb.AddSupportToChooser(bsfetcher.DefaultPrototypeChooser)
fetcher := fetcherCfg.WithReifier(unixfsnode.Reify)
r := resolver.NewBasicResolver(fetcher)
r = nopfsipfs.WrapResolver(r, blocker)

Expand Down

0 comments on commit 8f160d3

Please sign in to comment.