chore: update accordingly

This commit is contained in:
DarshanBPatel 2025-01-06 19:18:33 +05:30
parent 06799a7d21
commit dd9a8fff63
No known key found for this signature in database
GPG Key ID: 9A92CCD9899F0D22
2 changed files with 5 additions and 3 deletions

View File

@ -464,7 +464,9 @@ proc initAndStartApp(
nodeBuilder.withRecord(record) nodeBuilder.withRecord(record)
nodeBUilder.withSwitchConfiguration(maxConnections = some(MaxConnectedPeers)) nodeBUilder.withSwitchConfiguration(maxConnections = some(MaxConnectedPeers))
nodeBuilder.withPeerManagerConfig( nodeBuilder.withPeerManagerConfig(
maxConnections = MaxConnectedPeers, relayServiceRatio = "20:130", shardAware = true maxConnections = MaxConnectedPeers,
relayServiceRatio = "13.33:86.67",
shardAware = true,
) )
let res = nodeBuilder.withNetworkConfigurationDetails(bindIp, nodeTcpPort) let res = nodeBuilder.withNetworkConfigurationDetails(bindIp, nodeTcpPort)
if res.isErr(): if res.isErr():

View File

@ -64,7 +64,7 @@ proc parseRelayServiceRatio*(ratio: string): Result[(float, float), string] =
return err("relay service ratio must be non-negative, ratio = " & $ratio) return err("relay service ratio must be non-negative, ratio = " & $ratio)
let total = relayRatio + serviceRatio let total = relayRatio + serviceRatio
if floor(total) > 100: if int(total) != 100:
return err("Total ratio cannot be greater than 100, total =" & $total) return err("Total ratio should be 100, total =" & $total)
return ok((relayRatio / 100.0, serviceRatio / 100.0)) return ok((relayRatio / 100.0, serviceRatio / 100.0))