mirror of
https://github.com/logos-messaging/logos-messaging-nim.git
synced 2026-01-19 06:13:11 +00:00
deploy: 2ed41e8f6c3a35253397f22d85d985e4b6cb5ad8
This commit is contained in:
parent
521c4779b8
commit
012ac2e621
@ -669,12 +669,12 @@ proc mountRelay*(node: WakuNode,
|
||||
# @TODO: Better error handling: CatchableError is raised by `waitFor`
|
||||
{.gcsafe, raises: [Defect, InitializationError, LPError, CatchableError].} =
|
||||
|
||||
func msgIdProvider(m: messages.Message): seq[byte] =
|
||||
proc msgIdProvider(m: messages.Message): Result[MessageID, ValidationResult] =
|
||||
let mh = MultiHash.digest("sha2-256", m.data)
|
||||
if mh.isOk():
|
||||
return mh[].data.buffer
|
||||
return ok(mh[].data.buffer)
|
||||
else:
|
||||
return ($m.data.hash).toBytes()
|
||||
return ok(($m.data.hash).toBytes())
|
||||
|
||||
let wakuRelay = WakuRelay.init(
|
||||
switch = node.switch,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user