minor fix

This commit is contained in:
Sergei Tikhomirov 2025-06-03 18:35:13 +02:00
parent 34856918f4
commit ec363fd458
2 changed files with 4 additions and 4 deletions

View File

@ -1161,12 +1161,12 @@ proc lightpushPublishHandler(
message: WakuMessage,
peer: RemotePeerInfo | PeerInfo,
): Future[lightpush_protocol.WakuLightPushResult] {.async.} =
# note: eligibilityProof is not used in this function, it has already been checked
let msgHash = pubsubTopic.computeMessageHash(message).to0xHex()
if not node.wakuLightpushClient.isNil():
notice "publishing message with lightpush",
pubsubTopic = pubsubTopic,
contentTopic = message.contentTopic,
eligibilityProof = eligibilityProof,
target_peer_id = peer.peerId,
msg_hash = msgHash
return await node.wakuLightpushClient.publish(some(pubsubTopic), message, peer)
@ -1175,7 +1175,6 @@ proc lightpushPublishHandler(
notice "publishing message with self hosted lightpush",
pubsubTopic = pubsubTopic,
contentTopic = message.contentTopic,
eligibilityProof = eligibilityProof,
target_peer_id = peer.peerId,
msg_hash = msgHash
return

View File

@ -17,7 +17,8 @@ import
../serdes,
../responses,
../rest_serdes,
./types
./types,
waku/incentivization/rpc
export types
@ -93,7 +94,7 @@ proc installLightPushRequestHandler*(
makeRestResponse(lightpushResultServiceUnavailable(NoPeerNoneFoundError))
toPeer = some(aPeer)
let subFut = node.lightpushPublish(req.pubsubTopic, msg, toPeer)
let subFut = node.lightpushPublish(req.pubsubTopic, msg, none(EligibilityProof), toPeer)
if not await subFut.withTimeout(FutTimeoutForPushRequestProcessing):
error "Failed to request a message push due to timeout!"