mirror of https://github.com/waku-org/nwaku.git
chore: changing digest and hash log format from bytes to hex (#2363)
This commit is contained in:
parent
42204115c7
commit
025c6ec92a
|
@ -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():
|
||||
|
|
Loading…
Reference in New Issue