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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user