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

refactor: move session want management to separate class #184

Merged
merged 8 commits into from
Aug 20, 2019
2 changes: 1 addition & 1 deletion bitswap.go
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ func (bs *Bitswap) receiveBlocksFrom(ctx context.Context, from peer.ID, blks []b
// Split blocks into wanted blocks vs duplicates
wanted = make([]blocks.Block, 0, len(blks))
for _, b := range blks {
if bs.sm.InterestedIn(b.Cid()) {
if bs.sm.IsWanted(b.Cid()) {
wanted = append(wanted, b)
} else {
log.Debugf("[recv] block not in wantlist; cid=%s, peer=%s", b.Cid(), from)
Expand Down
Loading