Adds an event id hash check that doesn't create a separate bytearray to compare between the incoming hex from the relay and the recalculated byte array from SHA256.

This commit is contained in:
Vitor Pamplona
2025-09-16 17:06:01 -04:00
parent 80c884a4d1
commit 83e87c2cf4
4 changed files with 39 additions and 2 deletions
@@ -43,6 +43,13 @@ class HexBenchmark {
fr.acinq.secp256k1.Hex
.decode(hex)
@Test
fun hexIsEqual() {
r.measureRepeated {
assert(Hex.isEqual(hex, bytes))
}
}
@Test
fun hexDecodeOurs() {
r.measureRepeated {