mirror of
https://github.com/logos-messaging/logos-messaging-nim.git
synced 2026-01-07 00:13:06 +00:00
fix compilation issues
This commit is contained in:
parent
25d3847413
commit
b401a3626c
@ -88,6 +88,11 @@ proc handleMessage*(
|
||||
let
|
||||
msgHash = computeMessageHash(pubsubTopic, msg)
|
||||
msgHashHex = msgHash.to0xHex()
|
||||
msgTimestamp =
|
||||
if msg.timestamp > 0:
|
||||
msg.timestamp
|
||||
else:
|
||||
getNanosecondTime(getTime().toUnixFloat())
|
||||
|
||||
self.validator(msg).isOkOr:
|
||||
error "failed validator message",
|
||||
@ -96,7 +101,6 @@ proc handleMessage*(
|
||||
contentTopic = msg.contentTopic,
|
||||
msgTimestamp = msg.timestamp,
|
||||
usedTimestamp = msgTimestamp,
|
||||
digest = msgDigestHex,
|
||||
error = $error
|
||||
waku_archive_errors.inc(labelValues = [error])
|
||||
return
|
||||
@ -118,8 +122,7 @@ proc handleMessage*(
|
||||
pubsubTopic = pubsubTopic,
|
||||
contentTopic = msg.contentTopic,
|
||||
msgTimestamp = msg.timestamp,
|
||||
usedTimestamp = msgTimestamp,
|
||||
digest = msgDigestHex
|
||||
usedTimestamp = msgTimestamp
|
||||
|
||||
let insertDuration = getTime().toUnixFloat() - insertStartTime
|
||||
waku_archive_insert_duration_seconds.observe(insertDuration)
|
||||
|
||||
@ -82,6 +82,13 @@ proc handleMessage*(
|
||||
let
|
||||
msgHash = computeMessageHash(pubsubTopic, msg)
|
||||
msgHashHex = msgHash.to0xHex()
|
||||
msgTimestamp =
|
||||
if msg.timestamp > 0:
|
||||
msg.timestamp
|
||||
else:
|
||||
getNanosecondTime(getTime().toUnixFloat())
|
||||
msgDigest = computeDigest(msg)
|
||||
msgDigestHex = msgDigest.data.to0xHex()
|
||||
|
||||
self.validator(msg).isOkOr:
|
||||
error "failed validator message",
|
||||
@ -95,15 +102,6 @@ proc handleMessage*(
|
||||
waku_legacy_archive_errors.inc(labelValues = [error])
|
||||
return
|
||||
|
||||
let
|
||||
msgDigest = computeDigest(msg)
|
||||
msgDigestHex = msgDigest.data.to0xHex()
|
||||
msgTimestamp =
|
||||
if msg.timestamp > 0:
|
||||
msg.timestamp
|
||||
else:
|
||||
getNanosecondTime(getTime().toUnixFloat())
|
||||
|
||||
trace "handling message",
|
||||
msg_hash = msgHashHex,
|
||||
pubsubTopic = pubsubTopic,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user