Commit 470b02d4 authored by Brian Tiger Chow's avatar Brian Tiger Chow Committed by Jeromy

refactor(bitswap) move wantlist to loop receive

License: MIT
Signed-off-by: default avatarBrian Tiger Chow <brian@perfmode.com>
parent 12b83ff8
......@@ -178,6 +178,9 @@ 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