From 3264a4f5877203ba085f1a4e8e02e4ffc6ce9249 Mon Sep 17 00:00:00 2001 From: Ivan Folgueira Bande <128452529+Ivansete-status@users.noreply.github.com> Date: Tue, 26 Sep 2023 16:32:51 +0200 Subject: [PATCH] fix: libwaku.nim: unsubscribe -> unsubscribeAll to make it build properly (#2082) * libwaku.nim: unsubscribe -> unsubscribeAll to make it build properly We introduced a change in the next PR https://github.com/waku-org/nwaku/pull/1983/ that made the `libwaku` to stop building properly (make libwaku) because a signature change in the `unsubscribe` proc of waku/waku_relay/protocol.nim. This commit is a temporary workaround to make it work, and not block any ongoing PR tests, although not exactly as it is expected because we are unsubscribing from all topics. * ci.yml: adds library/** to force tests when changes under that folder --- .github/workflows/ci.yml | 1 + .../requests/protocols/relay_request.nim | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5009efe37..481a5f82a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -33,6 +33,7 @@ jobs: - 'vendor/**' - 'Makefile' - 'waku.nimble' + - 'library/**' v2: - 'waku/**' diff --git a/library/waku_thread/inter_thread_communication/requests/protocols/relay_request.nim b/library/waku_thread/inter_thread_communication/requests/protocols/relay_request.nim index dfa2fd7e4..3315348bd 100644 --- a/library/waku_thread/inter_thread_communication/requests/protocols/relay_request.nim +++ b/library/waku_thread/inter_thread_communication/requests/protocols/relay_request.nim @@ -99,7 +99,8 @@ proc process*(self: ptr RelayRequest, node.wakuRelay.subscribe($self.pubsubTopic, self.relayEventCallback) of UNSUBSCRIBE: - node.wakuRelay.unsubscribe($self.pubsubTopic) + # TODO: properly perform 'unsubscribe' + node.wakuRelay.unsubscribeAll($self.pubsubTopic) of PUBLISH: let numPeers = await node.wakuRelay.publish($self.pubsubTopic,