Skip to content

Commit

Permalink
bitswap(session): fix slice prealloc
Browse files Browse the repository at this point in the history
  • Loading branch information
Wondertan committed Oct 24, 2024
1 parent 392493d commit 69619bc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bitswap/client/internal/session/sessionwants.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ func (sw *sessionWants) GetNextWants() []cid.Cid {
currentLiveCount := len(sw.liveWants)
toAdd := sw.broadcastLimit - currentLiveCount
liveSize := min(toAdd, sw.toFetch.Len())
if liveSize == 0 {
if liveSize <= 0 {
return nil
}

Expand Down

0 comments on commit 69619bc

Please sign in to comment.