logos-delivery/tests/waku_rln_relay/rln/test_rln_interface.nim
Tanya S 57ff24760f
chore: phase 2 — rename/restructure waku_rln_relay → waku_rln (#3978)
* move rln specific procs and types

* Renaming and restructuring RLN module

* Rename waku_rln_relay to waku_rln

* rename rln-relay types to rln

* Fix linting

* update logScope topics to match new rln module name

* Rename waku_rln module to rln

* Rename WakuRln type to Rln, rename FFI raw type to RlnRaw to avoid collision

* Apply nph formatting

* Rename local rlnRelay to rln in mountRlnRelay
2026-06-27 12:28:59 +02:00

37 lines
880 B
Nim

import testutils/unittests, results
import logos_delivery/waku/rln/rln/rln_interface
import logos_delivery/waku/rln/rln/wrappers
suite "Vec_uint8":
suite "toVecUint8":
test "valid":
# Given
let bytes: seq[byte] = @[0x01, 0x02, 0x03]
# When — wrap as a Vec_uint8 view then read the bytes back
var vec = toVecUint8(bytes)
let roundtrip = vecToSeq(vec)
# Then — byte values are preserved
check:
roundtrip == bytes
suite "RlnConfig":
suite "createRLNInstance":
test "ok":
# When we create the RLN instance (stateless build — no tree_depth arg)
let rlnRes = createRLNInstance()
# Then it succeeds
check:
rlnRes.isOk()
test "default":
# When we create the RLN instance
let rlnRes = createRLNInstance()
# Then it succeeds
check:
rlnRes.isOk()