partial implementation

This commit is contained in:
Gabriel mermelstein 2024-08-14 10:40:42 +02:00
parent 6ae46c5fff
commit f5bcd1b0da
2 changed files with 11 additions and 3 deletions

View File

@ -19,7 +19,8 @@ import
../common/confutils/envvar/std/net as confEnvvarNet,
../common/logging,
../waku_enr,
../node/peer_manager
../node/peer_manager,
../waku_rln_relay/constants
include ../waku_core/message/default_values
@ -97,8 +98,8 @@ type WakuNodeConf* = object
rlnRelayUserMessageLimit* {.
desc:
"Set a user message limit for the rln membership registration. Must be a positive integer. Default is 1.",
defaultValue: 1,
"Set a user message limit for the rln membership registration. Must be a positive integer. Default is 20.",
defaultValue: DefaultUserMessageLimit,
name: "rln-relay-user-message-limit"
.}: uint64

View File

@ -220,6 +220,13 @@ proc setupProtocols(
onFatalErrorAction: onFatalErrorAction,
)
const defaultConf = defaultWakuNodeConf()
if not conf.rlnRelayDynamic:
if conf.rlnRelayEthClientAddress != defaultConf.rlnRelayEthClientAddress or
conf.rlnRelayEthContractAddress != defaultConf.rlnRelayEthContractAddress:
warn "Ethereum client or contract address were provided on static RLN. These configurations will be ignored"
try:
waitFor node.mountRlnRelay(rlnConf)
except CatchableError: