Unverified Commit f39b445c authored by Marten Seemann's avatar Marten Seemann Committed by GitHub

Merge pull request #70 from libp2p/fix-staticcheck

fix staticcheck
parents e2618ed1 077a3bc1
......@@ -172,7 +172,7 @@ func TestBackoffDiscoverySimultaneousQuery(t *testing.T) {
t.Fatal(err)
}
_ = <-ch1
<-ch1
ch2, err := dCache.FindPeers(ctx, ns)
if err != nil {
t.Fatal(err)
......@@ -185,7 +185,7 @@ func TestBackoffDiscoverySimultaneousQuery(t *testing.T) {
}
szCh1 := 1
for _ = range ch1 {
for range ch1 {
szCh1++
}
......
......@@ -75,17 +75,6 @@ func (s *mockDiscoveryServer) FindPeers(ns string, limit int) (<-chan peer.AddrI
return ch, nil
}
func (s *mockDiscoveryServer) hasPeerRecord(ns string, pid peer.ID) bool {
s.mx.Lock()
defer s.mx.Unlock()
if peers, ok := s.db[ns]; ok {
_, ok := peers[pid]
return ok
}
return false
}
type mockDiscoveryClient struct {
host host.Host
server *mockDiscoveryServer
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment