chore: continue fetch registered membership

This commit is contained in:
darshankabariya 2025-04-25 19:09:05 +05:30
parent 320f06c9f2
commit 7e1903274f
2 changed files with 6 additions and 3 deletions

View File

@ -199,6 +199,11 @@ proc trackRootChanges*(g: OnchainGroupManager) {.async.} =
if proofResult.isErr():
error "Failed to fetch Merkle proof", error = proofResult.error
g.merkleProofCache = proofResult.get()
# also need update registerd membership
let memberCount = cast[float64](await wakuRlnContract.commitmentIndex().call())
waku_rln_number_registered_memberships.set(memberCount)
await sleepAsync(rpcDelay)
method atomicBatch*(
@ -581,9 +586,6 @@ method init*(g: OnchainGroupManager): Future[GroupManagerResult[void]] {.async.}
ethRpc.ondisconnect = proc() =
asyncSpawn onDisconnect()
let memberCount = cast[float64](await wakuRlnContract.commitmentIndex().call())
waku_rln_number_registered_memberships.set(memberCount)
g.initialized = true
return ok()

View File

@ -120,5 +120,6 @@ proc getRlnMetricsLogger*(): RLNMetricsLogger =
info "Total proofs verified", count = freshProofsVerifiedCount
info "Total proofs generated", count = freshProofsGeneratedCount
info "Total proofs remaining", count = freshProofsRemainingCount
info "Total registered member", count = freshRegisteredMemberCount
return logMetrics