Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
willscott committed Apr 14, 2020
1 parent 1888fc4 commit fa2738d
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions test/integration/wan_lan_dht_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,8 @@ func RunDHTConnectivity(conf testutil.LatencyConfig, numPeers int) error {
wanAddr := makeAddr(uint32(i), true)
wanPeer.Peerstore.AddAddr(wanPeer.Identity, wanAddr, peerstore.PermanentAddrTTL)
for _, p := range wanPeers {
mn.LinkPeers(p.Identity, wanPeer.Identity)
wanPeer.PeerHost.Connect(connectionContext, p.Peerstore.PeerInfo(p.Identity))
_, _ = mn.LinkPeers(p.Identity, wanPeer.Identity)
_ = wanPeer.PeerHost.Connect(connectionContext, p.Peerstore.PeerInfo(p.Identity))
}
wanPeers = append(wanPeers, wanPeer)

Expand All @@ -120,8 +120,8 @@ func RunDHTConnectivity(conf testutil.LatencyConfig, numPeers int) error {
lanAddr := makeAddr(uint32(i), false)
lanPeer.Peerstore.AddAddr(lanPeer.Identity, lanAddr, peerstore.PermanentAddrTTL)
for _, p := range lanPeers {
mn.LinkPeers(p.Identity, lanPeer.Identity)
lanPeer.PeerHost.Connect(connectionContext, p.Peerstore.PeerInfo(p.Identity))
_, _ = mn.LinkPeers(p.Identity, lanPeer.Identity)
_ = lanPeer.PeerHost.Connect(connectionContext, p.Peerstore.PeerInfo(p.Identity))
}
lanPeers = append(lanPeers, lanPeer)
}
Expand Down Expand Up @@ -171,7 +171,7 @@ StartupWait:
if testPeer.PeerHost.Network().Connectedness(lanPeers[i].Identity) == corenet.Connected {
i = (i + 1) % len(lanPeers)
if testPeer.PeerHost.Network().Connectedness(lanPeers[i].Identity) == corenet.Connected {
testPeer.PeerHost.Network().ClosePeer(lanPeers[i].Identity)
_ = testPeer.PeerHost.Network().ClosePeer(lanPeers[i].Identity)
testPeer.PeerHost.Peerstore().ClearAddrs(lanPeers[i].Identity)
}
}
Expand Down Expand Up @@ -230,7 +230,7 @@ WanStartupWait:
if testPeer.PeerHost.Network().Connectedness(wanPeers[i].Identity) == corenet.Connected {
i = (i + 1) % len(wanPeers)
if testPeer.PeerHost.Network().Connectedness(wanPeers[i].Identity) == corenet.Connected {
testPeer.PeerHost.Network().ClosePeer(wanPeers[i].Identity)
_ = testPeer.PeerHost.Network().ClosePeer(wanPeers[i].Identity)
testPeer.PeerHost.Peerstore().ClearAddrs(wanPeers[i].Identity)
}
}
Expand All @@ -254,7 +254,7 @@ WanStartupWait:
// Finally, re-share the lan provided cid from a wan peer and expect a merged result.
i = rand.Intn(len(wanPeers))
if testPeer.PeerHost.Network().Connectedness(wanPeers[i].Identity) == corenet.Connected {
testPeer.PeerHost.Network().ClosePeer(wanPeers[i].Identity)
_ = testPeer.PeerHost.Network().ClosePeer(wanPeers[i].Identity)
testPeer.PeerHost.Peerstore().ClearAddrs(wanPeers[i].Identity)
}

Expand Down

0 comments on commit fa2738d

Please sign in to comment.