mirror of
https://github.com/logos-messaging/logos-messaging-nim.git
synced 2026-01-04 23:13:09 +00:00
more logs
This commit is contained in:
parent
3d2a54ebe8
commit
cd7840a176
@ -122,9 +122,13 @@ method atomicBatch*(
|
||||
initializedGuard(g)
|
||||
echo "-------------- atomicBatch 2"
|
||||
|
||||
let startTime = Moment.now()
|
||||
waku_rln_membership_insertion_duration_seconds.nanosecondTime:
|
||||
let operationSuccess =
|
||||
g.rlnInstance.atomicWrite(some(start), rateCommitments, toRemoveIndices)
|
||||
let insertionTime = (Moment.now() - startTime).seconds()
|
||||
echo "------- insertion time in seconds: ", insertionTime
|
||||
|
||||
echo "-------------- atomicBatch 3"
|
||||
if not operationSuccess:
|
||||
echo "-------------- atomicBatch "
|
||||
|
||||
@ -357,24 +357,29 @@ proc atomicWrite*(
|
||||
## returns true if the operation is successful
|
||||
## returns false if the operation fails
|
||||
|
||||
echo "------ atomicWrite 1"
|
||||
let startIndex =
|
||||
if index.isNone():
|
||||
MembershipIndex(0)
|
||||
else:
|
||||
index.get()
|
||||
|
||||
echo "------ atomicWrite 2"
|
||||
# serialize the idComms
|
||||
let idCommsBytes = serialize(idComms)
|
||||
var idCommsBuffer = idCommsBytes.toBuffer()
|
||||
let idCommsBufferPtr = addr idCommsBuffer
|
||||
echo "------ atomicWrite 3"
|
||||
|
||||
# serialize the toRemoveIndices
|
||||
let indicesBytes = serialize(toRemoveIndices)
|
||||
var indicesBuffer = indicesBytes.toBuffer()
|
||||
let indicesBufferPtr = addr indicesBuffer
|
||||
echo "------ atomicWrite 4"
|
||||
|
||||
let operationSuccess =
|
||||
atomic_write(rlnInstance, startIndex, idCommsBufferPtr, indicesBufferPtr)
|
||||
echo "------ atomicWrite 5"
|
||||
return operationSuccess
|
||||
|
||||
proc insertMembers*(
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user