mirror of
https://github.com/ipfs/kubo.git
synced 2026-02-28 13:57:52 +08:00
bitswap: remove useless code
License: MIT Signed-off-by: Steven Allen <steven@stebalien.com>
This commit is contained in:
parent
764cbe1c5b
commit
36cf839a55
@ -372,16 +372,6 @@ func (bs *Bitswap) ReceiveMessage(ctx context.Context, p peer.ID, incoming bsmsg
|
||||
return
|
||||
}
|
||||
|
||||
// quickly send out cancels, reduces chances of duplicate block receives
|
||||
var keys []*cid.Cid
|
||||
for _, block := range iblocks {
|
||||
if _, found := bs.wm.wl.Contains(block.Cid()); !found {
|
||||
log.Infof("received un-asked-for %s from %s", block, p)
|
||||
continue
|
||||
}
|
||||
keys = append(keys, block.Cid())
|
||||
}
|
||||
|
||||
wg := sync.WaitGroup{}
|
||||
for _, block := range iblocks {
|
||||
wg.Add(1)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user