diff --git a/internal/p2p/peermanager.go b/internal/p2p/peermanager.go index e3bd1d4da..9d0265622 100644 --- a/internal/p2p/peermanager.go +++ b/internal/p2p/peermanager.go @@ -144,10 +144,6 @@ type PeerManagerOptions struct { // retry times, to avoid thundering herds. 0 disables jitter. RetryTimeJitter time.Duration - // Maximum number of times we will try to dial a peer before - // marking it inactive. - MaxFailedDialAttempts uint32 - // PeerScores sets fixed scores for specific peers. It is mainly used // for testing. A score of 0 is ignored. PeerScores map[types.NodeID]PeerScore @@ -593,17 +589,6 @@ func (m *PeerManager) DialFailed(ctx context.Context, address NodeAddress) error addressInfo.LastDialFailure = time.Now().UTC() addressInfo.DialFailures++ - // // If a dial fails more than MaxFailedDialAttempts we should - // // mark it inactive and not attempt to dial it again. - // var totalDialFailures uint32 - // for _, addr := range peer.AddressInfo { - // totalDialFailures += addr.DialFailures - // } - // if m.options.MaxFailedDialAttempts > 0 && totalDialFailures > m.options.MaxFailedDialAttempts { - // peer.Inactive = true - // m.metrics.PeersInactivated.Add(1) - // } - if err := m.store.Set(peer); err != nil { return err } diff --git a/node/setup.go b/node/setup.go index 5555852d7..e01181eeb 100644 --- a/node/setup.go +++ b/node/setup.go @@ -231,7 +231,6 @@ func createPeerManager( MaxConnected: maxConns, MaxOutgoingConnections: maxConns / 2, MaxConnectedUpgrade: maxUpgradeConns, - MaxFailedDialAttempts: 1024, MaxPeers: maxUpgradeConns + 2*maxConns, MinRetryTime: 250 * time.Millisecond, MaxRetryTime: 30 * time.Minute,