mirror of
https://github.com/logos-messaging/logos-messaging-nim.git
synced 2026-01-05 15:33:08 +00:00
publish log for analysis
This commit is contained in:
parent
2761c283aa
commit
95f83d4b78
@ -111,14 +111,20 @@ proc publishToAny*(
|
||||
|
||||
return lightpushSuccessResult(publishedCount)
|
||||
|
||||
|
||||
proc publishWithConn*(
|
||||
wl: WakuLightPushClient, pubSubTopic: PubsubTopic, message: WakuMessage, conn: Connection
|
||||
wl: WakuLightPushClient,
|
||||
pubSubTopic: PubsubTopic,
|
||||
message: WakuMessage,
|
||||
conn: Connection,
|
||||
): Future[WakuLightPushResult] {.async, gcsafe.} =
|
||||
## This proc is similar to the publish one but in this case
|
||||
## we use existing connection to publish.
|
||||
|
||||
info "publishWithConn", msg_hash = computeMessageHash(pubsubTopic, message).to0xHex
|
||||
info "publishWithConn",
|
||||
my_peer_id = wl.peerManager.switch.peerInfo.peerId,
|
||||
peer_id = conn.peerId,
|
||||
msg_hash = computeMessageHash(pubsubTopic, message).to0xHex,
|
||||
sentTime = getNowInNanosecondTime()
|
||||
|
||||
let pushRequest = LightpushRequest(
|
||||
requestId: generateRequestId(wl.rng),
|
||||
@ -132,5 +138,5 @@ proc publishWithConn*(
|
||||
obs.onMessagePublished(pubSubTopic, message)
|
||||
|
||||
#TODO: Implement response handling.
|
||||
|
||||
|
||||
return lightpushSuccessResult(1)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user