mirror of
https://github.com/logos-messaging/logos-messaging-nim.git
synced 2026-01-08 08:53:06 +00:00
fix: store-query issue in v0.37.0
This commit is contained in:
parent
12952d070f
commit
5a7f4a33bb
@ -206,22 +206,16 @@ type WakuNodeConf* = object
|
||||
.}: bool
|
||||
|
||||
maxConnections* {.
|
||||
desc: "Maximum allowed number of libp2p connections.",
|
||||
defaultValue: 50,
|
||||
desc: "Maximum allowed number of libp2p connections. (Default: 200) can't set it to less than 200",
|
||||
defaultValue: 200,
|
||||
name: "max-connections"
|
||||
.}: int
|
||||
|
||||
maxRelayPeers* {.
|
||||
desc:
|
||||
"Deprecated. Use relay-service-ratio instead. It represents the maximum allowed number of relay peers.",
|
||||
name: "max-relay-peers"
|
||||
.}: Option[int]
|
||||
|
||||
relayServiceRatio* {.
|
||||
desc:
|
||||
"This percentage ratio represents the relay peers to service peers. For example, 60:40, tells that 60% of the max-connections will be used for relay protocol and the other 40% of max-connections will be reserved for other service protocols (e.g., filter, lightpush, store, metadata, etc.)",
|
||||
name: "relay-service-ratio",
|
||||
defaultValue: "60:40" # 60:40 ratio of relay to service peers
|
||||
defaultValue: "50:50"
|
||||
.}: string
|
||||
|
||||
colocationLimit* {.
|
||||
@ -957,9 +951,6 @@ proc toWakuConf*(n: WakuNodeConf): ConfResult[WakuConf] =
|
||||
b.withExtMultiAddrsOnly(n.extMultiAddrsOnly)
|
||||
b.withMaxConnections(n.maxConnections)
|
||||
|
||||
if n.maxRelayPeers.isSome():
|
||||
b.withMaxRelayPeers(n.maxRelayPeers.get())
|
||||
|
||||
if n.relayServiceRatio != "":
|
||||
b.withRelayServiceRatio(n.relayServiceRatio)
|
||||
b.withColocationLimit(n.colocationLimit)
|
||||
|
||||
@ -208,7 +208,11 @@ proc withPeerStoreCapacity*(b: var WakuConfBuilder, peerStoreCapacity: int) =
|
||||
b.peerStoreCapacity = some(peerStoreCapacity)
|
||||
|
||||
proc withMaxConnections*(b: var WakuConfBuilder, maxConnections: int) =
|
||||
b.maxConnections = some(maxConnections)
|
||||
if maxConnections < 200:
|
||||
raise newException(ValueError, "maxConnections cannot be less than 200")
|
||||
b.maxConnections = some(200)
|
||||
else:
|
||||
b.maxConnections = some(maxConnections)
|
||||
|
||||
proc withDnsAddrsNameServers*(
|
||||
b: var WakuConfBuilder, dnsAddrsNameServers: seq[IpAddress]
|
||||
@ -248,9 +252,6 @@ proc withAgentString*(b: var WakuConfBuilder, agentString: string) =
|
||||
proc withColocationLimit*(b: var WakuConfBuilder, colocationLimit: int) =
|
||||
b.colocationLimit = some(colocationLimit)
|
||||
|
||||
proc withMaxRelayPeers*(b: var WakuConfBuilder, maxRelayPeers: int) =
|
||||
b.maxRelayPeers = some(maxRelayPeers)
|
||||
|
||||
proc withRelayServiceRatio*(b: var WakuConfBuilder, relayServiceRatio: string) =
|
||||
b.relayServiceRatio = some(relayServiceRatio)
|
||||
|
||||
|
||||
@ -1041,7 +1041,7 @@ proc new*(
|
||||
wakuMetadata: WakuMetadata = nil,
|
||||
maxRelayPeers: Option[int] = none(int),
|
||||
maxServicePeers: Option[int] = none(int),
|
||||
relayServiceRatio: string = "60:40",
|
||||
relayServiceRatio: string = "50:50",
|
||||
storage: PeerStorage = nil,
|
||||
initialBackoffInSec = InitialBackoffInSec,
|
||||
backoffFactor = BackoffFactor,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user