Commit 1b9cb346 authored by John Steidley's avatar John Steidley

gosimple

parent 4509f045
......@@ -187,7 +187,7 @@ func TestDialWait(t *testing.T) {
} else {
t.Log("correctly got error:", err)
}
duration := time.Now().Sub(before)
duration := time.Since(before)
dt := s1.dialT
if duration < dt*dialAttempts {
......@@ -451,7 +451,7 @@ func TestDialBackoffClears(t *testing.T) {
} else {
t.Log("correctly got error:", err)
}
duration := time.Now().Sub(before)
duration := time.Since(before)
dt := s1.dialT
if duration < dt*dialAttempts {
......
......@@ -124,7 +124,7 @@ func (n *Network) InterfaceListenAddresses() ([]ma.Multiaddr, error) {
// For now only returns Connected || NotConnected. Expand into more later.
func (n *Network) Connectedness(p peer.ID) inet.Connectedness {
c := n.Swarm().ConnectionsToPeer(p)
if c != nil && len(c) > 0 {
if len(c) > 0 {
return inet.Connected
}
return inet.NotConnected
......
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