mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 18:32:23 +00:00
swarm/network: Deactivate WaitTillHealthy, unreliable pending suggestpeer
This commit is contained in:
parent
5ffe996b27
commit
db37920f0f
2 changed files with 3 additions and 2 deletions
|
|
@ -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
|
||||
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue