Skip to content

Commit

Permalink
swarm/network: Deactivate WaitTillHealthy, unreliable pending suggest…
Browse files Browse the repository at this point in the history
…peer
  • Loading branch information
nolash committed Jan 10, 2019
1 parent 5ffe996 commit db37920
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions swarm/network/kademlia.go
Original file line number Diff line number Diff line change
Expand Up @@ -683,7 +683,7 @@ func (k *Kademlia) saturation() int {
// TODO move to separate testing tools file
func (k *Kademlia) knowNeighbours(addrs [][]byte) (got bool, n int, missing [][]byte) {
pm := make(map[string]bool)
depth := depthForPot(k.conns, k.MinProxBinSize, k.base)
depth := depthForPot(k.conns, k.NeighbourhoodSize, k.base)
// create a map with all peers at depth and deeper known in the kademlia
k.eachAddr(nil, 255, func(p *BzzAddr, po int) bool {
// in order deepest to shallowest compared to the kademlia base address
Expand Down Expand Up @@ -724,7 +724,7 @@ func (k *Kademlia) connectedNeighbours(peers [][]byte) (got bool, n int, missing
// in order deepest to shallowest compared to the kademlia base address
// all bins (except self) are included (0 <= bin <= 255)
depth := depthForPot(k.conns, k.NeighbourhoodSize, k.base)
k.eachConn(nil, 255, func(p *Peer, po int, nn bool) bool {
k.eachConn(nil, 255, func(p *Peer, po int) bool {
if po < depth {
return false
}
Expand Down
1 change: 1 addition & 0 deletions swarm/network/simulation/kademlia_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import (
)

func TestWaitTillHealthy(t *testing.T) {
t.Skip("WaitTillHealthy depends on discovery, which relies on a reliable SuggestPeer, which is not reliable")

sim := New(map[string]ServiceFunc{
"bzz": func(ctx *adapters.ServiceContext, b *sync.Map) (node.Service, func(), error) {
Expand Down

0 comments on commit db37920

Please sign in to comment.