提交 37296d39 作者: Steven Allen

filter out "" from active peers in bitswap sessions

We use "" to indicate that the block came from the local node. There's no reason
to record "" as an active peer (doesn't really *hurt* but still...).

License: MIT
Signed-off-by: 's avatarSteven Allen <steven@stebalien.com>
上级 d840f67e
......@@ -159,7 +159,9 @@ func (s *Session) run(ctx context.Context) {
case blk := <-s.incoming:
s.tick.Stop()
s.addActivePeer(blk.from)
if blk.from != "" {
s.addActivePeer(blk.from)
}
s.receiveBlock(ctx, blk.blk)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论