mirror of
https://github.com/logos-messaging/logos-messaging-nim.git
synced 2026-01-11 10:23:06 +00:00
chore: comments out trackRootChanges
This commit is contained in:
parent
24b1d0b767
commit
8df5937380
@ -158,30 +158,30 @@ proc updateRoots*(g: OnchainGroupManager): Future[bool] {.async.} =
|
||||
|
||||
return false
|
||||
|
||||
proc trackRootChanges*(g: OnchainGroupManager): Future[void] {.async.} =
|
||||
## Continuously track changes to the Merkle root
|
||||
initializedGuard(g)
|
||||
|
||||
let ethRpc = g.ethRpc.get()
|
||||
let wakuRlnContract = g.wakuRlnContract.get()
|
||||
|
||||
# Set up the polling interval - more frequent to catch roots
|
||||
const rpcDelay = 5.seconds
|
||||
|
||||
info "Starting to track Merkle root changes"
|
||||
|
||||
while true:
|
||||
debug "starting to update roots"
|
||||
let rootUpdated = await g.updateRoots()
|
||||
|
||||
if rootUpdated:
|
||||
let proofResult = await g.fetchMerkleProofElements()
|
||||
if proofResult.isErr():
|
||||
error "Failed to fetch Merkle proof", error = proofResult.error
|
||||
g.merkleProofCache = proofResult.get()
|
||||
|
||||
debug "sleeping for 5 seconds"
|
||||
await sleepAsync(rpcDelay)
|
||||
# proc trackRootChanges*(g: OnchainGroupManager): Future[void] {.async.} =
|
||||
# ## Continuously track changes to the Merkle root
|
||||
# initializedGuard(g)
|
||||
#
|
||||
# let ethRpc = g.ethRpc.get()
|
||||
# let wakuRlnContract = g.wakuRlnContract.get()
|
||||
#
|
||||
# # Set up the polling interval - more frequent to catch roots
|
||||
# const rpcDelay = 5.seconds
|
||||
#
|
||||
# info "Starting to track Merkle root changes"
|
||||
#
|
||||
# while true:
|
||||
# debug "starting to update roots"
|
||||
# let rootUpdated = await g.updateRoots()
|
||||
#
|
||||
# if rootUpdated:
|
||||
# let proofResult = await g.fetchMerkleProofElements()
|
||||
# if proofResult.isErr():
|
||||
# error "Failed to fetch Merkle proof", error = proofResult.error
|
||||
# g.merkleProofCache = proofResult.get()
|
||||
#
|
||||
# debug "sleeping for 5 seconds"
|
||||
# await sleepAsync(rpcDelay)
|
||||
|
||||
method atomicBatch*(
|
||||
g: OnchainGroupManager,
|
||||
@ -269,9 +269,6 @@ method register*(
|
||||
g.userMessageLimit = some(userMessageLimit)
|
||||
g.membershipIndex = some(membershipIndex.toMembershipIndex())
|
||||
|
||||
# Start tracking root changes after registration is complete
|
||||
asyncSpawn g.trackRootChanges()
|
||||
|
||||
return
|
||||
|
||||
method withdraw*(
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user