Skip to content

Commit

Permalink
refactor: bitswap client does not need ProviderQueryManager (#676)
Browse files Browse the repository at this point in the history
btswap client does not need ProviderQueryManager

The bitswap Client does not to hold a reference to the provider query manager. The session maintains the ProviderQueryManager reference.
  • Loading branch information
gammazero authored Oct 15, 2024
1 parent 7bf89a7 commit 08fb71d
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions bitswap/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,6 @@ func New(parent context.Context, network bsnet.BitSwapNetwork, bstore blockstore
network: network,
process: px,
pm: pm,
pqm: pqm,
sm: sm,
sim: sim,
notif: notif,
Expand All @@ -184,7 +183,7 @@ func New(parent context.Context, network bsnet.BitSwapNetwork, bstore blockstore
option(bs)
}

bs.pqm.Startup()
pqm.Startup()

// bind the context and process.
// do it over here to avoid closing before all setup is done.
Expand All @@ -203,9 +202,6 @@ func New(parent context.Context, network bsnet.BitSwapNetwork, bstore blockstore
type Client struct {
pm *bspm.PeerManager

// the provider query manager manages requests to find providers
pqm *bspqm.ProviderQueryManager

// network delivers messages on behalf of the session
network bsnet.BitSwapNetwork

Expand Down

0 comments on commit 08fb71d

Please sign in to comment.