From d162af2cb502c0f7bed7c36a78f3c2a060e55eaa Mon Sep 17 00:00:00 2001 From: Prem Chaitanya Prathi Date: Tue, 20 Jan 2026 13:54:00 +0530 Subject: [PATCH] revert formatting changes --- waku/node/kernel_api/lightpush.nim | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/waku/node/kernel_api/lightpush.nim b/waku/node/kernel_api/lightpush.nim index 0e44f60fb..e647d4d1b 100644 --- a/waku/node/kernel_api/lightpush.nim +++ b/waku/node/kernel_api/lightpush.nim @@ -250,23 +250,22 @@ proc lightpushPublish*( if not node.wakuMix.isNil(): lmixify = true - let #[ error "failed to publish message using mix as mix protocol is not mounted" return lighpushErrorResult( LightPushErrorCode.SERVICE_NOT_AVAILABLE, "Waku lightpush with mix not available" ) ]# - toPeer: RemotePeerInfo = peerOpt.valueOr: - if not node.wakuLightPush.isNil(): - RemotePeerInfo.init(node.peerId()) - elif not node.wakuLightpushClient.isNil(): - node.peerManager.selectPeer(WakuLightPushCodec).valueOr: - let msg = "no suitable remote peers" - error "failed to publish message", msg = msg - return lighpushErrorResult(LightPushErrorCode.NO_PEERS_TO_RELAY, msg) - else: - return lighpushErrorResult( - LightPushErrorCode.NO_PEERS_TO_RELAY, "no suitable remote peers" - ) + let toPeer: RemotePeerInfo = peerOpt.valueOr: + if not node.wakuLightPush.isNil(): + RemotePeerInfo.init(node.peerId()) + elif not node.wakuLightpushClient.isNil(): + node.peerManager.selectPeer(WakuLightPushCodec).valueOr: + let msg = "no suitable remote peers" + error "failed to publish message", msg = msg + return lighpushErrorResult(LightPushErrorCode.NO_PEERS_TO_RELAY, msg) + else: + return lighpushErrorResult( + LightPushErrorCode.NO_PEERS_TO_RELAY, "no suitable remote peers" + ) let pubsubForPublish = pubSubTopic.valueOr: if node.wakuAutoSharding.isNone():