From 9f910e6a9804babcac04cab1daf1b91795a57fc4 Mon Sep 17 00:00:00 2001 From: tycho garen Date: Fri, 10 Jun 2022 12:21:23 -0400 Subject: [PATCH] cleanup (cherry picked from commit eddb23b5af6a74f39c5cc534af9556db938a1bce) --- internal/p2p/peermanager.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/p2p/peermanager.go b/internal/p2p/peermanager.go index 2b5beeeec..53e702f39 100644 --- a/internal/p2p/peermanager.go +++ b/internal/p2p/peermanager.go @@ -1297,7 +1297,6 @@ type peerInfo struct { MutableScore int64 // updated by router Inactive bool - DialFailures int64 } // peerInfoFromProto converts a Protobuf PeerInfo message to a peerInfo, @@ -1381,6 +1380,8 @@ func (p *peerInfo) LastDialed() (time.Time, bool) { success = false } } + + // if we never modified last, then if last.Add(1).IsZero() { last = last.Add(1) }