Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions node/modules/graphsync.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,10 @@ func (p *LinkSystemProv) LinkSys() *ipld.LinkSystem {
}

func SetLinkSystem(proxy *LinkSystemProv, prov provider.Interface) {
e := prov.(*engine.Engine)
proxy.LinkSystem = e.LinkSystem()
e, ok := prov.(*engine.Engine)
if ok {
proxy.LinkSystem = e.LinkSystem()
}
}

// RetrievalGraphsync creates a graphsync instance used to serve retrievals.
Expand Down
2 changes: 1 addition & 1 deletion retrievalmarket/server/gsunpaidretrieval.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ func (g *GraphsyncUnpaidRetrieval) Start(ctx context.Context) error {
g.ctx = ctx
g.validator.ctx = ctx

if g.linkSystem != nil {
if g.linkSystem != nil && g.linkSystem.LinkSys() != nil {
// The index provider uses graphsync to fetch advertisements.
// We need to tell graphsync to use a different IPLD Link System to provide
// the advertisements (instead of using the blockstore).
Expand Down