From 1ba9df4be01453cd26abd82b811546c2bb2b2f81 Mon Sep 17 00:00:00 2001 From: Ivan FB <128452529+Ivansete-status@users.noreply.github.com> Date: Fri, 19 Apr 2024 20:03:36 +0200 Subject: [PATCH] refactor: move app.nim and networks_config.nim to waku/factory (#2608) --- apps/networkmonitor/networkmonitor.nim | 2 +- 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 6 files changed, 6 insertions(+), 6 deletions(-) rename {apps/wakunode2 => waku/factory}/app.nim (99%) rename {apps/wakunode2 => waku/factory}/networks_config.nim (100%) diff --git a/apps/networkmonitor/networkmonitor.nim b/apps/networkmonitor/networkmonitor.nim index f113b2e93..1bfaee062 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 diff --git a/apps/wakunode2/wakunode2.nim b/apps/wakunode2/wakunode2.nim index 015ac158e..ee1089ae1 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 f04b90ab9..9a09fe101 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 c61cc1b3c..64d8f7a06 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 c6ca66ff5..1838110f1 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