From dd9a8fff6308f381d9e01556199bc37da466dd89 Mon Sep 17 00:00:00 2001 From: DarshanBPatel Date: Mon, 6 Jan 2025 19:18:33 +0530 Subject: [PATCH] chore: update accordingly --- apps/networkmonitor/networkmonitor.nim | 4 +++- waku/common/utils/parse_size_units.nim | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/apps/networkmonitor/networkmonitor.nim b/apps/networkmonitor/networkmonitor.nim index 4fdf34ab3..2f9fd012b 100644 --- a/apps/networkmonitor/networkmonitor.nim +++ b/apps/networkmonitor/networkmonitor.nim @@ -464,7 +464,9 @@ proc initAndStartApp( nodeBuilder.withRecord(record) nodeBUilder.withSwitchConfiguration(maxConnections = some(MaxConnectedPeers)) nodeBuilder.withPeerManagerConfig( - maxConnections = MaxConnectedPeers, relayServiceRatio = "20:130", shardAware = true + maxConnections = MaxConnectedPeers, + relayServiceRatio = "13.33:86.67", + shardAware = true, ) let res = nodeBuilder.withNetworkConfigurationDetails(bindIp, nodeTcpPort) if res.isErr(): diff --git a/waku/common/utils/parse_size_units.nim b/waku/common/utils/parse_size_units.nim index 1812f1bea..d6513c340 100644 --- a/waku/common/utils/parse_size_units.nim +++ b/waku/common/utils/parse_size_units.nim @@ -64,7 +64,7 @@ proc parseRelayServiceRatio*(ratio: string): Result[(float, float), string] = return err("relay service ratio must be non-negative, ratio = " & $ratio) let total = relayRatio + serviceRatio - if floor(total) > 100: - return err("Total ratio cannot be greater than 100, total =" & $total) + if int(total) != 100: + return err("Total ratio should be 100, total =" & $total) return ok((relayRatio / 100.0, serviceRatio / 100.0))