diff --git a/daemon.go b/daemon.go index f01aee2..ce96f88 100644 --- a/daemon.go +++ b/daemon.go @@ -49,6 +49,8 @@ const ( dhtSource = "Amino DHT" ) +var defaultProtocolFilter = []string{"transport-bitswap", "unknown"} + func newDaemon(ctx context.Context, acceleratedDHT bool) (*daemon, error) { rm, err := NewResourceManager() if err != nil { @@ -149,7 +151,7 @@ type providerOutput struct { // concurrently. A check of connectivity and Bitswap availability is performed // for each provider found. func (d *daemon) runCidCheck(ctx context.Context, cidKey cid.Cid, ipniURL string) (cidCheckOutput, error) { - crClient, err := client.New(ipniURL, client.WithStreamResultsRequired(), client.WithProtocolFilter([]string{"transport-bitswap", "unknown"})) + crClient, err := client.New(ipniURL, client.WithStreamResultsRequired(), client.WithProtocolFilter(defaultProtocolFilter)) if err != nil { return nil, fmt.Errorf("failed to create content router client: %w", err) }