chore: lint issue

This commit is contained in:
DarshanBPatel 2024-12-17 23:57:52 +05:30
parent 5f9ed0831f
commit 9afaab0103
No known key found for this signature in database
GPG Key ID: 9A92CCD9899F0D22
2 changed files with 7 additions and 3 deletions

View File

@ -463,7 +463,9 @@ proc initAndStartApp(
nodeBuilder.withNodeKey(key)
nodeBuilder.withRecord(record)
nodeBUilder.withSwitchConfiguration(maxConnections = some(MaxConnectedPeers))
nodeBuilder.withPeerManagerConfig(maxConnections = MaxConnectedPeers, relayServiceRatio = 0.154, shardAware = true)
nodeBuilder.withPeerManagerConfig(
maxConnections = MaxConnectedPeers, relayServiceRatio = 0.154, shardAware = true
)
let res = nodeBuilder.withNetworkConfigurationDetails(bindIp, nodeTcpPort)
if res.isErr():
return err("node building error" & $res.error)

View File

@ -1000,8 +1000,10 @@ proc new*(
maxConnections = maxConnections,
maxRelayPeers = relayPeers,
maxServicePeers = servicePeers
raise newException(Defect, "Max number of connections can't be greater than maxRelayPeers + maxServicePeers")
raise newException(
Defect,
"Max number of connections can't be greater than maxRelayPeers + maxServicePeers",
)
else:
servicePeers = int(float(maxConnections) / (1 + relayServiceRatio))
relayPeers = maxConnections - servicePeers