mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-03-06 19:35:04 +00:00
set doNotDropBefore to 10 minutes
The protection period is meant for peers to have time to start contribution, but at the moment we have no logic related to "start contribute", so the number is a bit arbitrary. The logic in setting this based on the drop interval is from the other side of things: for not protecting a new node too long. What I wanted to avoid is protecting a node for too long, while the whole old peerset can be changed. Actually, for this it would be better to use peerDropIntervalMin .... Let's make it independent for now, then we can consider again later. I would like this number to be bigger than the time a the dropped peer needs to find a replacement. 10min sounds safe to start with, then we can checked the effect when it is rolled out, and adjust. Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
This commit is contained in:
parent
2a9372ea5f
commit
976e039e37
1 changed files with 1 additions and 1 deletions
|
|
@ -35,7 +35,7 @@ const (
|
|||
// Interval between peer drop events (uniform between min and max)
|
||||
peerDropIntervalMax = 7 * time.Minute
|
||||
// Avoid dropping peers for some time after connection
|
||||
doNotDropBefore = 2 * peerDropIntervalMax
|
||||
doNotDropBefore = 10 * time.Minute
|
||||
// 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
|
||||
// aggressive drop behavior.
|
||||
|
|
|
|||
Loading…
Reference in a new issue