mirror of
https://github.com/ipfs/kubo.git
synced 2026-03-06 16:58:11 +08:00
noop provider for nil dht
This commit is contained in:
parent
d767715ea7
commit
92710b3f2c
@ -180,6 +180,9 @@ func SweepingReprovider(provide bool, reprovideStrategy string, opts ...reprovid
|
||||
return fx.Options(
|
||||
keyProvider,
|
||||
fx.Provide(func(d *dual.DHT, keyProvider provider.KeyChanFunc, opts ...reprovider.Option) (provider.System, error) {
|
||||
if d == nil {
|
||||
return provider.NewNoopProvider(), nil
|
||||
}
|
||||
ctx := context.Background()
|
||||
// Create DHT Sweeping Reprovider
|
||||
r, err := d.NewSweepingReprovider(opts...)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user