Commit 37296d39 authored by Steven Allen's avatar 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: default avatarSteven Allen <steven@stebalien.com>
parent 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 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