From 160308b0dfb7e8954da5e47017769a07679956bc Mon Sep 17 00:00:00 2001 From: Janos Guljas Date: Mon, 21 Jan 2019 14:04:06 +0100 Subject: [PATCH] swarm/network: remove stream cap check in kademlia On function --- swarm/network/kademlia.go | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/swarm/network/kademlia.go b/swarm/network/kademlia.go index c5e97bf1d1..f9b38fc48d 100644 --- a/swarm/network/kademlia.go +++ b/swarm/network/kademlia.go @@ -283,22 +283,6 @@ func (k *Kademlia) SuggestPeer() (suggestedPeer *BzzAddr, saturationDepth int, c func (k *Kademlia) On(p *Peer) (uint8, bool) { k.lock.Lock() defer k.lock.Unlock() - - caps := p.Caps() - - var found bool - for _, c := range caps { - if c.Name == "stream" { - found = true - break - } - } - - if !found { - depth := uint8(k.saturation()) - return depth, false - } - var ins bool k.conns, _, _, _ = pot.Swap(k.conns, p, Pof, func(v pot.Val) pot.Val { // if not found live