@@ -13,7 +13,6 @@ import (
1313 bsmq "github.com/ipfs/boxo/bitswap/client/internal/messagequeue"
1414 "github.com/ipfs/boxo/bitswap/client/internal/notifications"
1515 bspm "github.com/ipfs/boxo/bitswap/client/internal/peermanager"
16- bspqm "github.com/ipfs/boxo/bitswap/client/internal/providerquerymanager"
1716 bssession "github.com/ipfs/boxo/bitswap/client/internal/session"
1817 bssim "github.com/ipfs/boxo/bitswap/client/internal/sessioninterestmanager"
1918 bssm "github.com/ipfs/boxo/bitswap/client/internal/sessionmanager"
@@ -99,7 +98,7 @@ func WithoutDuplicatedBlockStats() Option {
9998 }
10099}
101100
102- type ContentSearcher = bspqm. ContentRouter
101+ type ContentSearcher = bssession. ProviderFinder
103102
104103// WithContentSearch allows the client to search for providers when it is not
105104// able to find the content itself.
@@ -155,11 +154,6 @@ func New(parent context.Context, network bsnet.BitSwapNetwork, bstore blockstore
155154 option (bs )
156155 }
157156
158- if bs .router != nil {
159- bs .pqm = bspqm .New (ctx , network , bs .router )
160- bs .pqm .Startup ()
161- }
162-
163157 // bind the context and process.
164158 // do it over here to avoid closing before all setup is done.
165159 go func () {
@@ -179,10 +173,6 @@ type Client struct {
179173
180174 pm * bspm.PeerManager
181175
182- // the provider query manager manages requests to find providers
183- // is nil if content routing is disabled
184- pqm * bspqm.ProviderQueryManager
185-
186176 // network delivers messages on behalf of the session
187177 network bsnet.BitSwapNetwork
188178
@@ -244,13 +234,7 @@ func (bs *Client) sessionFactory(
244234 rebroadcastDelay delay.D ,
245235 self peer.ID ,
246236) bssm.Session {
247- // avoid typed nils
248- var pqm bssession.ProviderFinder
249- if bs .pqm != nil {
250- pqm = bs .pqm
251- }
252-
253- return bssession .New (sessctx , sessmgr , id , spm , pqm , sim , pm , bpm , notif , provSearchDelay , rebroadcastDelay , self )
237+ return bssession .New (sessctx , sessmgr , id , spm , sim , pm , bpm , notif , provSearchDelay , rebroadcastDelay , bs .router , bs .network )
254238}
255239
256240// onDontHaveTimeout is called when a want-block is sent to a peer that
0 commit comments