Skip to content

Commit 31d3e4d

Browse files
committed
rename options
1 parent 7cdeb4b commit 31d3e4d

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

bitswap/client/client.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,8 @@ func New(parent context.Context, network bsnet.BitSwapNetwork, bstore blockstore
7676
bpm := bsbpm.New()
7777
pm := bspm.New(ctx, peerQueueFactory, network.Self())
7878
pqm := bspqm.New(ctx, network,
79-
bspqm.WithMaxConcurrentFinds(opts.pqmMaxConcurrentFinds),
80-
bspqm.WithMaxProvidersPerFind(opts.pqmMaxProvidersPerFind))
79+
bspqm.WithMaxConcurrentFinds(opts.maxConcurrentFinds),
80+
bspqm.WithMaxProvidersPerFind(opts.maxProvidersPerFind))
8181

8282
sessionFactory := func(
8383
sessctx context.Context,

bitswap/client/optios.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ type clientConfig struct {
1717
tracer tracer.Tracer
1818

1919
// ProviderQueryManager options.
20-
pqmMaxConcurrentFinds int
21-
pqmMaxProvidersPerFind int
20+
maxConcurrentFinds int
21+
maxProvidersPerFind int
2222
}
2323

2424
// Option defines the functional option type that can be used to configure
@@ -92,14 +92,14 @@ func WithoutDuplicatedBlockStats() Option {
9292
}
9393
}
9494

95-
func WithPQMMaxConcurrentFinds(n int) Option {
95+
func WithMaxConcurrentFinds(n int) Option {
9696
return func(c *clientConfig) {
97-
c.pqmMaxConcurrentFinds = n
97+
c.maxConcurrentFinds = n
9898
}
9999
}
100100

101-
func WithPQMMaxProvidersPerFind(n int) Option {
101+
func WithMaxProvidersPerFind(n int) Option {
102102
return func(c *clientConfig) {
103-
c.pqmMaxProvidersPerFind = n
103+
c.maxProvidersPerFind = n
104104
}
105105
}

0 commit comments

Comments
 (0)