update group-manager-base isReady()

This commit is contained in:
stubbsta 2026-01-07 10:45:01 +02:00
parent a15adaf772
commit a13b822357
No known key found for this signature in database
3 changed files with 9 additions and 10 deletions

View File

@ -144,6 +144,4 @@ method generateProof*(
return err("generateProof is not implemented")
method isReady*(g: GroupManager): Future[bool] {.base, async.} =
raise newException(
CatchableError, "isReady proc for " & $g.type & " is not implemented yet"
)
return true

View File

@ -628,14 +628,15 @@ method stop*(g: OnchainGroupManager): Future[void] {.async, gcsafe.} =
g.initialized = false
method isReady*(g: OnchainGroupManager): Future[Result[bool, string]] {.async.} =
method isReady*(g: OnchainGroupManager): Future[bool] {.async.} =
checkInitialized(g).isOkOr:
return err(error)
return false
if g.ethRpc.isNone():
return err("Ethereum RPC client is not configured")
error "Ethereum RPC client is not configured"
return false
if g.wakuRlnContract.isNone():
return err("Waku RLN contract is not configured")
return ok(true)
error "Waku RLN contract is not configured"
return false
return true

View File

@ -440,7 +440,7 @@ proc mount(
wakuRlnRelay.epochMonitorFuture = monitorEpochs(wakuRlnRelay)
return ok(wakuRlnRelay)
proc isReady*(rlnPeer: WakuRLNRelay): Future[bool] {.async: (raises: [Exception]).} =
proc isReady*(rlnPeer: WakuRLNRelay): Future[bool] {.async.} =
## returns true if the rln-relay protocol is ready to relay messages
## returns false otherwise