publish log for analysis

This commit is contained in:
Prem Chaitanya Prathi 2025-04-09 11:05:06 +05:30
parent 2761c283aa
commit 95f83d4b78

View File

@ -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)