Skip to content
This repository has been archived by the owner on Feb 1, 2023. It is now read-only.

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-Authored-By: dirkmc <[email protected]>
  • Loading branch information
Stebalien and dirkmc authored Mar 16, 2020
1 parent 6d57007 commit b63cf22
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions internal/peermanager/peermanager.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,12 +170,12 @@ func (pm *PeerManager) SendCancels(ctx context.Context, cancelKs []cid.Cid) {
}
}

// CurrentWants returns the list of pending wants, want-haves and want-blocks.
// CurrentWants returns the list of pending wants (both want-haves and want-blocks).
func (pm *PeerManager) CurrentWants() []cid.Cid {
pm.pqLk.RLock()
defer pm.pqLk.RUnlock()

return pm.pwm.GetWantBlocks()
return pm.pwm.GetWants()
}

// CurrentWantBlocks returns the list of pending want-blocks
Expand Down
2 changes: 1 addition & 1 deletion internal/peermanager/peerwantmanager.go
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ func (pwm *peerWantManager) GetWantHaves() []cid.Cid {
return res.Keys()
}

// GetWants returns the set of all wants, want-blocks and want-haves.
// GetWants returns the set of all wants (both want-blocks and want-haves).
func (pwm *peerWantManager) GetWants() []cid.Cid {
res := cid.NewSet()

Expand Down

0 comments on commit b63cf22

Please sign in to comment.