mirror of
https://github.com/logos-messaging/logos-delivery.git
synced 2026-03-07 09:33:13 +00:00
fix(rln-relay): segfault when no params except rln-relay is passed in (#2047)
This commit is contained in:
parent
afdcfc78b9
commit
45fe2d3bee
@ -19,7 +19,8 @@ method init*(g: StaticGroupManager): Future[void] {.async,gcsafe.} =
|
|||||||
let
|
let
|
||||||
groupSize = g.groupSize
|
groupSize = g.groupSize
|
||||||
groupKeys = g.groupKeys
|
groupKeys = g.groupKeys
|
||||||
membershipIndex = g.membershipIndex.get()
|
membershipIndex = if g.membershipIndex.isSome(): g.membershipIndex.get()
|
||||||
|
else: raise newException(ValueError, "Membership index is not set")
|
||||||
|
|
||||||
if membershipIndex < MembershipIndex(0) or membershipIndex >= MembershipIndex(groupSize):
|
if membershipIndex < MembershipIndex(0) or membershipIndex >= MembershipIndex(groupSize):
|
||||||
raise newException(ValueError, "Invalid membership index. Must be within 0 and " & $(groupSize - 1) & "but was " & $membershipIndex)
|
raise newException(ValueError, "Invalid membership index. Must be within 0 and " & $(groupSize - 1) & "but was " & $membershipIndex)
|
||||||
|
|||||||
@ -408,7 +408,7 @@ proc isReady*(rlnPeer: WakuRLNRelay): Future[bool] {.async.} =
|
|||||||
|
|
||||||
proc new*(T: type WakuRlnRelay,
|
proc new*(T: type WakuRlnRelay,
|
||||||
conf: WakuRlnConfig,
|
conf: WakuRlnConfig,
|
||||||
registrationHandler: Option[RegistrationHandler] = none(RegistrationHandler)
|
registrationHandler = none(RegistrationHandler)
|
||||||
): Future[RlnRelayResult[WakuRlnRelay]] {.async.} =
|
): Future[RlnRelayResult[WakuRlnRelay]] {.async.} =
|
||||||
## Mounts the rln-relay protocol on the node.
|
## Mounts the rln-relay protocol on the node.
|
||||||
## The rln-relay protocol can be mounted in two modes: on-chain and off-chain.
|
## The rln-relay protocol can be mounted in two modes: on-chain and off-chain.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user