From a65ab985471bcfeb719f5f6d9838a7b5538fdc0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CGheisMohammadi=E2=80=9D?= <36589218+GheisMohammadi@users.noreply.github.com> Date: Mon, 13 Feb 2023 15:24:35 +0800 Subject: [PATCH] add watermark low/high options for p2p connection manager --- p2p/discovery/option_test.go | 4 ++-- rosetta/infra/harmony-mainnet.conf | 2 ++ rosetta/infra/harmony-pstn.conf | 2 ++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/p2p/discovery/option_test.go b/p2p/discovery/option_test.go index e782151f5..1829e77c8 100644 --- a/p2p/discovery/option_test.go +++ b/p2p/discovery/option_test.go @@ -40,14 +40,14 @@ func TestDHTOption_getLibp2pRawOptions(t *testing.T) { opt: DHTConfig{ BootNodes: testAddrStr, }, - expLen: 2, + expLen: 1, }, { opt: DHTConfig{ BootNodes: testAddrStr, DataStoreFile: &validPath, }, - expLen: 3, + expLen: 2, }, { opt: DHTConfig{ diff --git a/rosetta/infra/harmony-mainnet.conf b/rosetta/infra/harmony-mainnet.conf index 8d51609cb..051324e19 100644 --- a/rosetta/infra/harmony-mainnet.conf +++ b/rosetta/infra/harmony-mainnet.conf @@ -74,6 +74,8 @@ Version = "2.5.13" MaxConnsPerIP = 10 MaxPeers = 0 Port = 9000 + ConnManagerLowWatermark = 160 + ConnManagerHighWatermark = 192 WaitForEachPeerToConnect = false [Pprof] diff --git a/rosetta/infra/harmony-pstn.conf b/rosetta/infra/harmony-pstn.conf index 1bb865c1a..bc7df55bc 100644 --- a/rosetta/infra/harmony-pstn.conf +++ b/rosetta/infra/harmony-pstn.conf @@ -74,6 +74,8 @@ Version = "2.5.13" MaxConnsPerIP = 10 MaxPeers = 0 Port = 9000 + ConnManagerLowWatermark = 160 + ConnManagerHighWatermark = 192 WaitForEachPeerToConnect = false [Pprof]