fix all remaining target

This commit is contained in:
darshankabariya 2026-01-14 00:53:25 +05:30
parent a35f4427f1
commit 35eb6e9ae1
No known key found for this signature in database
GPG Key ID: 9A92CCD9899F0D22
3 changed files with 10 additions and 8 deletions

View File

@ -13,7 +13,8 @@ import
chronos,
eth/keys,
bearssl,
stew/[byteutils, results],
stew/byteutils,
results,
metrics,
metrics/chronos_httpserver
import

View File

@ -35,7 +35,7 @@ suite "Waku Message - Deterministic hashing":
byteutils.toHex(message.payload) == "010203045445535405060708"
byteutils.toHex(message.meta) == ""
byteutils.toHex(toBytesBE(uint64(message.timestamp))) == "175789bfa23f8400"
messageHash.toHex() ==
byteutils.toHex(messageHash) ==
"cccab07fed94181c83937c8ca8340c9108492b7ede354a6d95421ad34141fd37"
test "digest computation - meta field (12 bytes)":
@ -69,7 +69,7 @@ suite "Waku Message - Deterministic hashing":
byteutils.toHex(message.payload) == "010203045445535405060708"
byteutils.toHex(message.meta) == "73757065722d736563726574"
byteutils.toHex(toBytesBE(uint64(message.timestamp))) == "175789bfa23f8400"
messageHash.toHex() ==
byteutils.toHex(messageHash) ==
"b9b4852f9d8c489846e8bfc6c5ca6a1a8d460a40d28832a966e029eb39619199"
test "digest computation - meta field (64 bytes)":
@ -104,7 +104,7 @@ suite "Waku Message - Deterministic hashing":
byteutils.toHex(message.meta) ==
"000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f"
byteutils.toHex(toBytesBE(uint64(message.timestamp))) == "175789bfa23f8400"
messageHash.toHex() ==
byteutils.toHex(messageHash) ==
"653460d04f66c5b11814d235152f4f246e6f03ef80a305a825913636fbafd0ba"
test "digest computation - zero length payload":
@ -132,7 +132,7 @@ suite "Waku Message - Deterministic hashing":
## Then
check:
messageHash.toHex() ==
byteutils.toHex(messageHash) ==
"0f6448cc23b2db6c696aa6ab4b693eff4cf3549ff346fe1dbeb281697396a09f"
test "waku message - check meta size is enforced":

View File

@ -1,5 +1,6 @@
{.used.}
import std/options
import
results,
testutils/unittests,
@ -155,9 +156,9 @@ suite "Waku Core - Peers":
## When
var builder = EnrBuilder.init(enrPrivKey, seqNum = enrSeqNum)
builder.withIpAddressAndPorts(
ipAddr = some(parseIpAddress("127.0.0.1")),
tcpPort = some(Port(0)),
udpPort = some(Port(0)),
ipAddr = options.some(parseIpAddress("127.0.0.1")),
tcpPort = options.some(Port(0)),
udpPort = options.some(Port(0)),
)
builder.withWakuCapabilities(Capabilities.Relay, Capabilities.Store)