bitswap: remove useless code

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
This commit is contained in:
Steven Allen 2017-12-05 09:48:55 -08:00
parent 764cbe1c5b
commit 36cf839a55

View File

@ -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)