From 9977fcdc4052be063e6197991dbfeedd0e8b0970 Mon Sep 17 00:00:00 2001 From: Ivan Folgueira Bande Date: Fri, 19 Apr 2024 13:27:44 +0200 Subject: [PATCH 1/2] refactor: move app and networks_config to waku/factory --- apps/wakunode2/wakunode2.nim | 4 ++-- .../requests/node_lifecycle_request.nim | 2 +- tests/wakunode2/test_app.nim | 2 +- {apps/wakunode2 => waku/factory}/app.nim | 2 +- {apps/wakunode2 => waku/factory}/networks_config.nim | 0 5 files changed, 5 insertions(+), 5 deletions(-) rename {apps/wakunode2 => waku/factory}/app.nim (99%) rename {apps/wakunode2 => waku/factory}/networks_config.nim (100%) diff --git a/apps/wakunode2/wakunode2.nim b/apps/wakunode2/wakunode2.nim index 015ac158e0..ee1089ae16 100644 --- a/apps/wakunode2/wakunode2.nim +++ b/apps/wakunode2/wakunode2.nim @@ -17,8 +17,8 @@ import ../../tools/rln_db_inspector/rln_db_inspector, ../../waku/common/logging, ../../waku/factory/external_config, - ./networks_config, - ./app + ../../waku/factory/networks_config, + ../../waku/factory/app logScope: topics = "wakunode main" diff --git a/library/waku_thread/inter_thread_communication/requests/node_lifecycle_request.nim b/library/waku_thread/inter_thread_communication/requests/node_lifecycle_request.nim index f04b90ab9c..9a09fe101d 100644 --- a/library/waku_thread/inter_thread_communication/requests/node_lifecycle_request.nim +++ b/library/waku_thread/inter_thread_communication/requests/node_lifecycle_request.nim @@ -22,7 +22,7 @@ import ../../../../waku/waku_store, ../../../../waku/factory/builder, ../../../../waku/factory/node_factory, - ../../../apps/wakunode2/networks_config, + ../../../../waku/factory/networks_config, ../../../events/[json_message_event, json_base_event], ../../../alloc, ../../config diff --git a/tests/wakunode2/test_app.nim b/tests/wakunode2/test_app.nim index c61cc1b3c7..64d8f7a06a 100644 --- a/tests/wakunode2/test_app.nim +++ b/tests/wakunode2/test_app.nim @@ -11,7 +11,7 @@ import libp2p/switch import ../testlib/common, ../testlib/wakucore, ../testlib/wakunode -include ../../apps/wakunode2/app +include ../../waku/factory/app suite "Wakunode2 - App": test "compilation version should be reported": diff --git a/apps/wakunode2/app.nim b/waku/factory/app.nim similarity index 99% rename from apps/wakunode2/app.nim rename to waku/factory/app.nim index c6ca66ff52..1838110f1d 100644 --- a/apps/wakunode2/app.nim +++ b/waku/factory/app.nim @@ -155,7 +155,7 @@ proc init*(T: type App, conf: WakuNodeConf): Result[App, string] = ## Setup DiscoveryV5 -proc setupDiscoveryV5*(app: App): WakuDiscoveryV5 = +proc setupDiscoveryV5(app: App): WakuDiscoveryV5 = let dynamicBootstrapEnrs = app.dynamicBootstrapNodes.filterIt(it.hasUdpPort()).mapIt(it.enr.get()) diff --git a/apps/wakunode2/networks_config.nim b/waku/factory/networks_config.nim similarity index 100% rename from apps/wakunode2/networks_config.nim rename to waku/factory/networks_config.nim From 711d00fca28d654e6334b574356bd3041d7f42e8 Mon Sep 17 00:00:00 2001 From: Ivan Folgueira Bande Date: Fri, 19 Apr 2024 14:20:09 +0200 Subject: [PATCH 2/2] networkmonitor.nim: update import --- apps/networkmonitor/networkmonitor.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/networkmonitor/networkmonitor.nim b/apps/networkmonitor/networkmonitor.nim index f113b2e939..1bfaee0623 100644 --- a/apps/networkmonitor/networkmonitor.nim +++ b/apps/networkmonitor/networkmonitor.nim @@ -30,7 +30,7 @@ import ../../waku/waku_relay, ../../waku/waku_rln_relay, ../../waku/factory/builder, - ../wakunode2/networks_config, + ../../waku/factory/networks_config, ./networkmonitor_metrics, ./networkmonitor_config, ./networkmonitor_utils