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