mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-26 06:36:43 +00:00
delete unnecessary check
This commit is contained in:
parent
c8be0f9a74
commit
a5af52630f
1 changed files with 1 additions and 4 deletions
|
|
@ -33,7 +33,7 @@ const (
|
|||
// Interval between peer drop events (uniform between min and max)
|
||||
peerDropIntervalMin = 3 * time.Minute
|
||||
// Interval between peer drop events (uniform between min and max)
|
||||
peerDropIntervalMax = 7 * time.Minute
|
||||
peerDropIntervalMax = peerDropIntervalMin + 4*time.Minute
|
||||
// Avoid dropping peers for some time after connection
|
||||
doNotDropBefore = 10 * time.Minute
|
||||
// How close to max should we initiate the drop timer. O should be fine,
|
||||
|
|
@ -82,9 +82,6 @@ func newDropper(maxDialPeers, maxInboundPeers int) *dropper {
|
|||
peerDropTimer: time.NewTimer(randomDuration(peerDropIntervalMin, peerDropIntervalMax)),
|
||||
shutdownCh: make(chan struct{}),
|
||||
}
|
||||
if peerDropIntervalMin > peerDropIntervalMax {
|
||||
panic("peerDropIntervalMin duration must be less than or equal to peerDropIntervalMax duration")
|
||||
}
|
||||
return cm
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue