diff --git a/bitswap/client/client.go b/bitswap/client/client.go index 0ea294b97..c73a30416 100644 --- a/bitswap/client/client.go +++ b/bitswap/client/client.go @@ -76,8 +76,8 @@ func New(parent context.Context, network bsnet.BitSwapNetwork, bstore blockstore bpm := bsbpm.New() pm := bspm.New(ctx, peerQueueFactory, network.Self()) pqm := bspqm.New(ctx, network, - bspqm.WithMaxConcurrentFinds(opts.pqmMaxConcurrentFinds), - bspqm.WithMaxProvidersPerFind(opts.pqmMaxProvidersPerFind)) + bspqm.WithMaxConcurrentFinds(opts.maxConcurrentFinds), + bspqm.WithMaxProvidersPerFind(opts.maxProvidersPerFind)) sessionFactory := func( sessctx context.Context, diff --git a/bitswap/client/optios.go b/bitswap/client/optios.go index cd7220a8b..ef0979ae9 100644 --- a/bitswap/client/optios.go +++ b/bitswap/client/optios.go @@ -17,8 +17,8 @@ type clientConfig struct { tracer tracer.Tracer // ProviderQueryManager options. - pqmMaxConcurrentFinds int - pqmMaxProvidersPerFind int + maxConcurrentFinds int + maxProvidersPerFind int } // Option defines the functional option type that can be used to configure @@ -92,14 +92,14 @@ func WithoutDuplicatedBlockStats() Option { } } -func WithPQMMaxConcurrentFinds(n int) Option { +func WithMaxConcurrentFinds(n int) Option { return func(c *clientConfig) { - c.pqmMaxConcurrentFinds = n + c.maxConcurrentFinds = n } } -func WithPQMMaxProvidersPerFind(n int) Option { +func WithMaxProvidersPerFind(n int) Option { return func(c *clientConfig) { - c.pqmMaxProvidersPerFind = n + c.maxProvidersPerFind = n } }