File tree 2 files changed +5
-3
lines changed
2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -70,8 +70,10 @@ func (p *LinkSystemProv) LinkSys() *ipld.LinkSystem {
70
70
}
71
71
72
72
func SetLinkSystem (proxy * LinkSystemProv , prov provider.Interface ) {
73
- e := prov .(* engine.Engine )
74
- proxy .LinkSystem = e .LinkSystem ()
73
+ e , ok := prov .(* engine.Engine )
74
+ if ok {
75
+ proxy .LinkSystem = e .LinkSystem ()
76
+ }
75
77
}
76
78
77
79
// RetrievalGraphsync creates a graphsync instance used to serve retrievals.
Original file line number Diff line number Diff line change @@ -120,7 +120,7 @@ func (g *GraphsyncUnpaidRetrieval) Start(ctx context.Context) error {
120
120
g .ctx = ctx
121
121
g .validator .ctx = ctx
122
122
123
- if g .linkSystem != nil {
123
+ if g .linkSystem != nil && g . linkSystem . LinkSys () != nil {
124
124
// The index provider uses graphsync to fetch advertisements.
125
125
// We need to tell graphsync to use a different IPLD Link System to provide
126
126
// the advertisements (instead of using the blockstore).
You can’t perform that action at this time.
0 commit comments