mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-04-12 20:58:33 +00:00
p2p/connmanager: set meaningful defaults
Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
This commit is contained in:
parent
75e4c26564
commit
4635dac0b5
1 changed files with 2 additions and 2 deletions
|
|
@ -29,13 +29,13 @@ import (
|
||||||
|
|
||||||
const (
|
const (
|
||||||
// Interval between peer drop events
|
// Interval between peer drop events
|
||||||
peerDropInterval = 30 * time.Second
|
peerDropInterval = 5 * time.Minute
|
||||||
// Avoid dropping peers for some time after connection
|
// Avoid dropping peers for some time after connection
|
||||||
doNotDropBefore = 2 * peerDropInterval
|
doNotDropBefore = 2 * peerDropInterval
|
||||||
// How close to max should we initiate the drop timer. O should be fine,
|
// How close to max should we initiate the drop timer. O should be fine,
|
||||||
// dropping when no more peers can be added. Larger numbers result in more
|
// dropping when no more peers can be added. Larger numbers result in more
|
||||||
// aggressive drop behavior.
|
// aggressive drop behavior.
|
||||||
peerDropThreshold = 5
|
peerDropThreshold = 0
|
||||||
)
|
)
|
||||||
|
|
||||||
// connManager monitors the state of the peer pool and makes changes as follows:
|
// connManager monitors the state of the peer pool and makes changes as follows:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue