Commit 6af9f417 authored by Brian Tiger Chow's avatar Brian Tiger Chow Committed by Jeromy

fix(bitswap/loop) add to wantlist just once

oops

set Add is idempotent but it's a waste of resources

License: MIT
Signed-off-by: default avatarBrian Tiger Chow <brian@perfmode.com>
parent 7d72132c
......@@ -188,9 +188,6 @@ func (bs *bitswap) run(ctx context.Context) {
}
case ks := <-bs.batchRequests:
// TODO: implement batching on len(ks) > X for some X
for _, k := range ks {
bs.wantlist.Add(k)
}
if len(ks) == 0 {
log.Warning("Received batch request for zero blocks")
continue
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment