Skip to content

Commit

Permalink
fix: build
Browse files Browse the repository at this point in the history
  • Loading branch information
rymnc committed Jun 2, 2023
1 parent 558d477 commit 04170d0
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,10 @@ template initializedGuard*(g: StaticGroupManager): untyped =
raise newException(ValueError, "StaticGroupManager is not initialized")

method init*(g: StaticGroupManager): Future[void] {.async,gcsafe.} =
if g.membershipIndex.isNone():
raise newException(ValueError, "Membership index is not set")

let
groupSize = g.groupSize
groupKeys = g.groupKeys
membershipIndex = g.membershipIndex.get()
membershipIndex = g.membershipIndex

if membershipIndex < MembershipIndex(0) or membershipIndex >= MembershipIndex(groupSize):
raise newException(ValueError, "Invalid membership index. Must be within 0 and " & $(groupSize - 1) & "but was " & $membershipIndex)
Expand Down

0 comments on commit 04170d0

Please sign in to comment.