swarm/network: restore comment and unskip snapshot sync tests

This commit is contained in:
zelig 2019-01-09 10:27:16 +01:00
parent 7fc97b8e74
commit 35cebf227c
2 changed files with 3 additions and 2 deletions

View file

@ -684,7 +684,10 @@ func (k *Kademlia) saturation() int {
func (k *Kademlia) knowNeighbours(addrs [][]byte) (got bool, n int, missing [][]byte) { func (k *Kademlia) knowNeighbours(addrs [][]byte) (got bool, n int, missing [][]byte) {
pm := make(map[string]bool) pm := make(map[string]bool)
depth := depthForPot(k.conns, k.MinProxBinSize, k.base) depth := depthForPot(k.conns, k.MinProxBinSize, 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 { k.eachAddr(nil, 255, func(p *BzzAddr, po int) bool {
// in order deepest to shallowest compared to the kademlia base address
// all bins (except self) are included (0 <= bin <= 255)
if po < depth { if po < depth {
return false return false
} }

View file

@ -76,7 +76,6 @@ func dummyRequestFromPeers(_ context.Context, req *network.Request) (*enode.ID,
//they are expected to store based on the syncing protocol. //they are expected to store based on the syncing protocol.
//Number of chunks and nodes can be provided via commandline too. //Number of chunks and nodes can be provided via commandline too.
func TestSyncingViaGlobalSync(t *testing.T) { func TestSyncingViaGlobalSync(t *testing.T) {
t.Skip("not working")
if runtime.GOOS == "darwin" && os.Getenv("TRAVIS") == "true" { if runtime.GOOS == "darwin" && os.Getenv("TRAVIS") == "true" {
t.Skip("Flaky on mac on travis") t.Skip("Flaky on mac on travis")
} }
@ -108,7 +107,6 @@ func TestSyncingViaGlobalSync(t *testing.T) {
} }
func TestSyncingViaDirectSubscribe(t *testing.T) { func TestSyncingViaDirectSubscribe(t *testing.T) {
t.Skip("not working")
if runtime.GOOS == "darwin" && os.Getenv("TRAVIS") == "true" { if runtime.GOOS == "darwin" && os.Getenv("TRAVIS") == "true" {
t.Skip("Flaky on mac on travis") t.Skip("Flaky on mac on travis")
} }