Skip to content

Commit

Permalink
swarm/network: restore comment and unskip snapshot sync tests
Browse files Browse the repository at this point in the history
  • Loading branch information
zelig committed Jan 9, 2019
1 parent 7fc97b8 commit 35cebf2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 3 additions & 0 deletions swarm/network/kademlia.go
Original file line number Diff line number Diff line change
Expand Up @@ -684,7 +684,10 @@ func (k *Kademlia) saturation() int {
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)
// 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
// all bins (except self) are included (0 <= bin <= 255)
if po < depth {
return false
}
Expand Down
2 changes: 0 additions & 2 deletions swarm/network/stream/snapshot_sync_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ func dummyRequestFromPeers(_ context.Context, req *network.Request) (*enode.ID,
//they are expected to store based on the syncing protocol.
//Number of chunks and nodes can be provided via commandline too.
func TestSyncingViaGlobalSync(t *testing.T) {
t.Skip("not working")
if runtime.GOOS == "darwin" && os.Getenv("TRAVIS") == "true" {
t.Skip("Flaky on mac on travis")
}
Expand Down Expand Up @@ -108,7 +107,6 @@ func TestSyncingViaGlobalSync(t *testing.T) {
}

func TestSyncingViaDirectSubscribe(t *testing.T) {
t.Skip("not working")
if runtime.GOOS == "darwin" && os.Getenv("TRAVIS") == "true" {
t.Skip("Flaky on mac on travis")
}
Expand Down

0 comments on commit 35cebf2

Please sign in to comment.