mirror of
https://github.com/logos-messaging/logos-delivery.git
synced 2026-04-16 05:03:32 +00:00
chore: resolving lint
This commit is contained in:
parent
4d314b376d
commit
a4db8895e4
@ -50,13 +50,13 @@ type ConfResult*[T] = Result[T, string]
|
||||
type EthRpcUrl* = distinct string
|
||||
|
||||
type StartUpCommand* = enum
|
||||
noCommand # default, runs waku
|
||||
noCommand # default, runs waku
|
||||
generateRlnKeystore # generates a new RLN keystore
|
||||
|
||||
type WakuMode* {.pure.} = enum
|
||||
noMode # default - use explicit CLI flags as-is
|
||||
Core # full service node
|
||||
Edge # client-only node
|
||||
Core # full service node
|
||||
Edge # client-only node
|
||||
|
||||
type WakuNodeConf* = object
|
||||
configFile* {.
|
||||
@ -183,8 +183,7 @@ type WakuNodeConf* = object
|
||||
name: "agent-string"
|
||||
.}: string
|
||||
|
||||
nodekey* {.desc: "P2P node private key as 64 char hex string.",
|
||||
name: "nodekey".}:
|
||||
nodekey* {.desc: "P2P node private key as 64 char hex string.", name: "nodekey".}:
|
||||
Option[PrivateKey]
|
||||
|
||||
listenAddress* {.
|
||||
@ -193,13 +192,11 @@ type WakuNodeConf* = object
|
||||
name: "listen-address"
|
||||
.}: IpAddress
|
||||
|
||||
tcpPort* {.desc: "TCP listening port.", defaultValue: 60000,
|
||||
name: "tcp-port".}:
|
||||
tcpPort* {.desc: "TCP listening port.", defaultValue: 60000, name: "tcp-port".}:
|
||||
Port
|
||||
|
||||
portsShift* {.
|
||||
desc: "Add a shift to all port numbers.", defaultValue: 0,
|
||||
name: "ports-shift"
|
||||
desc: "Add a shift to all port numbers.", defaultValue: 0, name: "ports-shift"
|
||||
.}: uint16
|
||||
|
||||
nat* {.
|
||||
@ -243,13 +240,11 @@ type WakuNodeConf* = object
|
||||
.}: int
|
||||
|
||||
peerStoreCapacity* {.
|
||||
desc: "Maximum stored peers in the peerstore.",
|
||||
name: "peer-store-capacity"
|
||||
desc: "Maximum stored peers in the peerstore.", name: "peer-store-capacity"
|
||||
.}: Option[int]
|
||||
|
||||
peerPersistence* {.
|
||||
desc: "Enable peer persistence.", defaultValue: false,
|
||||
name: "peer-persistence"
|
||||
desc: "Enable peer persistence.", defaultValue: false, name: "peer-persistence"
|
||||
.}: bool
|
||||
|
||||
## DNS addrs config
|
||||
@ -406,7 +401,7 @@ hence would have reachability issues.""",
|
||||
|
||||
storeSyncInterval* {.
|
||||
desc: "Interval between store sync attempts. In seconds.",
|
||||
defaultValue: 300, # 5 minutes
|
||||
defaultValue: 300, # 5 minutes
|
||||
name: "store-sync-interval"
|
||||
.}: uint32
|
||||
|
||||
@ -437,7 +432,7 @@ hence would have reachability issues.""",
|
||||
filterSubscriptionTimeout* {.
|
||||
desc:
|
||||
"Timeout for filter subscription without ping or refresh it, in seconds. Only for v2 filter protocol.",
|
||||
defaultValue: 300, # 5 minutes
|
||||
defaultValue: 300, # 5 minutes
|
||||
name: "filter-subscription-timeout"
|
||||
.}: uint16
|
||||
|
||||
@ -664,8 +659,7 @@ with the drawback of consuming some more bandwidth.""",
|
||||
.}: bool
|
||||
|
||||
websocketPort* {.
|
||||
desc: "WebSocket listening port.", defaultValue: 8000,
|
||||
name: "websocket-port"
|
||||
desc: "WebSocket listening port.", defaultValue: 8000, name: "websocket-port"
|
||||
.}: Port
|
||||
|
||||
websocketSecureSupport* {.
|
||||
@ -762,8 +756,7 @@ proc parseCmdArg*(T: type ProtectedShard, p: string): T =
|
||||
raise newException(ValueError, "Invalid public key")
|
||||
|
||||
if isNumber(elements[0]):
|
||||
return ProtectedShard(shard: uint16.parseCmdArg(elements[0]),
|
||||
key: publicKey)
|
||||
return ProtectedShard(shard: uint16.parseCmdArg(elements[0]), key: publicKey)
|
||||
|
||||
# TODO: Remove when removing protected-topic configuration
|
||||
let shard = RelayShard.parse(elements[0]).valueOr:
|
||||
@ -891,11 +884,11 @@ proc load*(T: type WakuNodeConf, version = ""): ConfResult[T] =
|
||||
secondarySources = proc(
|
||||
conf: WakuNodeConf, sources: auto
|
||||
) {.gcsafe, raises: [ConfigurationError].} =
|
||||
sources.addConfigFile(Envvar, InputFile("wakunode2"))
|
||||
sources.addConfigFile(Envvar, InputFile("wakunode2"))
|
||||
|
||||
if conf.configFile.isSome():
|
||||
sources.addConfigFile(Toml, conf.configFile.get())
|
||||
,
|
||||
if conf.configFile.isSome():
|
||||
sources.addConfigFile(Toml, conf.configFile.get())
|
||||
,
|
||||
)
|
||||
|
||||
ok(conf)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user