mirror of
https://github.com/logos-messaging/logos-messaging-nim.git
synced 2026-01-09 17:33:09 +00:00
Test idcommitment to BE and debug logs
This commit is contained in:
parent
d0ee8ed8ac
commit
1d9b4918a3
@ -26,11 +26,11 @@ type IdentityCredential* = object
|
||||
idCommitment*: IDCommitment
|
||||
|
||||
proc toUInt256*(idCommitment: IDCommitment): UInt256 =
|
||||
let pk = UInt256.fromBytesLE(idCommitment)
|
||||
let pk = UInt256.fromBytesBE(idCommitment)
|
||||
return pk
|
||||
|
||||
proc toIDCommitment*(idCommitmentUint: UInt256): IDCommitment =
|
||||
let pk = IDCommitment(@(idCommitmentUint.toBytesLE()))
|
||||
let pk = IDCommitment(@(idCommitmentUint.toBytesBE()))
|
||||
return pk
|
||||
|
||||
type MembershipIndex* = uint
|
||||
|
||||
@ -226,8 +226,9 @@ method register*(
|
||||
g.retryWrapper(gasPrice, "Failed to get gas price"):
|
||||
int(await ethRpc.provider.eth_gasPrice()) * 2
|
||||
let idCommitmentHex = identityCredential.idCommitment.inHex()
|
||||
debug "identityCredential idCommitmentHex", idCommitmentNoConvert = idCommitmentHex
|
||||
debug "identityCredential idCommitmentHex", idCommitment = idCommitmentHex
|
||||
let idCommitment = identityCredential.idCommitment.toUInt256()
|
||||
debug "identityCredential idCommitment toUInt256", idCommitment = idCommitment
|
||||
let idCommitmentsToErase: seq[UInt256] = @[]
|
||||
debug "registering the member",
|
||||
idCommitment = idCommitment,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user