提交 7c2053c3 作者: Brian Tiger Chow 提交者: 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: 's avatarBrian Tiger Chow <brian@perfmode.com>
上级 d0304def
......@@ -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 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论