mirror of
https://github.com/tendermint/tendermint.git
synced 2026-01-06 21:36:26 +00:00
p2p: pass maxConns for MaxPeers during node setup (#8684)
* pass maxConns for MaxPeers * add upgrade connections to max connections for max peers * change the formula to calculate max peers
This commit is contained in:
@@ -223,11 +223,13 @@ func createPeerManager(
|
||||
maxConns = 64
|
||||
}
|
||||
|
||||
maxUpgradeConns := uint16(4)
|
||||
|
||||
options := p2p.PeerManagerOptions{
|
||||
SelfAddress: selfAddr,
|
||||
MaxConnected: maxConns,
|
||||
MaxConnectedUpgrade: 4,
|
||||
MaxPeers: 1000,
|
||||
MaxConnectedUpgrade: maxUpgradeConns,
|
||||
MaxPeers: maxUpgradeConns + 2*maxConns,
|
||||
MinRetryTime: 250 * time.Millisecond,
|
||||
MaxRetryTime: 30 * time.Minute,
|
||||
MaxRetryTimePersistent: 5 * time.Minute,
|
||||
|
||||
Reference in New Issue
Block a user