From 5e6be10c8e791441a738c07cdd227cacfe0c528c Mon Sep 17 00:00:00 2001 From: Ivan FB Date: Tue, 30 Jun 2026 14:08:39 +0200 Subject: [PATCH] messaging: fix send-processor chain after conflict resolution A merge conflict left setupSendProcessorChain half-migrated: the body referenced a `waku` that was not a parameter and the caller used a `w` that no longer existed, so the send service did not compile. Restore the kernel-routed form: take the Waku kernel, build the relay handler via waku.relayPushHandler(), and drop the now-unused WakuNode internals. Co-Authored-By: Claude Opus 4.8 --- .../send_service/send_service.nim | 29 +++---------------- 1 file changed, 4 insertions(+), 25 deletions(-) diff --git a/logos_delivery/messaging/delivery_service/send_service/send_service.nim b/logos_delivery/messaging/delivery_service/send_service/send_service.nim index fcf1d0fc2..f482a2aff 100644 --- a/logos_delivery/messaging/delivery_service/send_service/send_service.nim +++ b/logos_delivery/messaging/delivery_service/send_service/send_service.nim @@ -7,16 +7,7 @@ import chronos, chronicles, libp2p/utility import brokers/broker_context import ./[send_processor, relay_processor, lightpush_processor, delivery_task], - logos_delivery/waku/[ - waku_core, - node/waku_node, - node/peer_manager, - waku_store/common, - waku_relay/protocol, - rln/rln, - waku_lightpush/client, - waku_lightpush/callbacks, - ], + logos_delivery/waku/[waku_core, waku_store/common], logos_delivery/waku/waku, logos_delivery/waku/api/[store, subscriptions, publish] import logos_delivery/api/messaging_client_api @@ -62,11 +53,7 @@ type SendService* = ref object of RootObj lastStoreCheckTime: Moment ## throttles store validation queries to ArchiveTime cadence proc setupSendProcessorChain( - peerManager: PeerManager, - lightpushClient: WakuLightPushClient, - relay: WakuRelay, - rlnRelay: Rln, - brokerCtx: BrokerContext, + waku: Waku, brokerCtx: BrokerContext ): Result[BaseSendProcessor, string] = let isRelayAvail = waku.hasRelay() let isLightPushAvail = waku.hasLightpush() @@ -77,13 +64,7 @@ proc setupSendProcessorChain( var processors = newSeq[BaseSendProcessor]() if isRelayAvail: - let rln: Option[Rln] = - if rlnRelay.isNil(): - none[Rln]() - else: - some(rlnRelay) - let publishProc = getRelayPushHandler(relay, rln) - + let publishProc = waku.relayPushHandler() processors.add(RelaySendProcessor.new(isLightPushAvail, publishProc, brokerCtx)) if isLightPushAvail: processors.add(LightpushSendProcessor.new(waku, brokerCtx)) @@ -106,9 +87,7 @@ proc new*( let checkStoreForMessages = preferP2PReliability and waku.isStoreMounted() - let sendProcessorChain = setupSendProcessorChain( - w.peerManager, w.wakuLightPushClient, w.wakuRelay, w.rln, w.brokerCtx - ).valueOr: + let sendProcessorChain = setupSendProcessorChain(waku, waku.brokerCtx).valueOr: return err("failed to setup SendProcessorChain: " & $error) let sendService = SendService(