chore: changing digest and hash log format from bytes to hex (#2363)

This commit is contained in:
gabrielmer 2024-01-25 16:03:48 +01:00 committed by GitHub
parent 42204115c7
commit 025c6ec92a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 2 deletions

View File

@ -5,7 +5,7 @@ else:
import
std/[tables, times, sequtils, options, algorithm, strutils],
stew/results,
stew/[results, byteutils],
chronicles,
chronos,
regex,
@ -108,10 +108,12 @@ proc handleMessage*(w: WakuArchive,
let
msgDigest = computeDigest(msg)
msgHash = computeMessageHash(pubsubTopic, msg)
msgDigestHex = toHex(msgDigest.data)
msgHashHex = toHex(msgHash)
msgReceivedTime = if msg.timestamp > 0: msg.timestamp
else: getNanosecondTime(getTime().toUnixFloat())
trace "handling message", pubsubTopic=pubsubTopic, contentTopic=msg.contentTopic, timestamp=msg.timestamp, digest=msgDigest, messageHash=msgHash
trace "handling message", pubsubTopic=pubsubTopic, contentTopic=msg.contentTopic, timestamp=msg.timestamp, digest=msgDigestHex, messageHash=msgHashHex
let putRes = await w.driver.put(pubsubTopic, msg, msgDigest, msgHash, msgReceivedTime)
if putRes.isErr():