mirror of
https://github.com/logos-messaging/logos-messaging-nim.git
synced 2026-02-18 21:03:36 +00:00
update group-manager-base isReady()
This commit is contained in:
parent
a15adaf772
commit
a13b822357
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user