mirror of
https://github.com/logos-messaging/logos-messaging-nim.git
synced 2026-08-24 23:11:12 +00:00
refactor: introduce proper logos_delivery layers folder structure (#3935)
Co-authored-by: NagyZoltanPeter <113987313+NagyZoltanPeter@users.noreply.github.com>
This commit is contained in:
co-authored by
NagyZoltanPeter
parent
38d951a2fd
commit
3b03ca29b1
@@ -1,13 +1,15 @@
|
||||
import std/[options], results, testutils/unittests
|
||||
|
||||
import
|
||||
waku/node/peer_manager/peer_store/migrations,
|
||||
logos_delivery/waku/node/peer_manager/peer_store/migrations,
|
||||
../../waku_archive/archive_utils,
|
||||
../../testlib/[simple_mock]
|
||||
|
||||
import std/[tables, strutils, os], results, chronicles
|
||||
|
||||
import waku/common/databases/db_sqlite, waku/common/databases/common
|
||||
import
|
||||
logos_delivery/waku/common/databases/db_sqlite,
|
||||
logos_delivery/waku/common/databases/common
|
||||
|
||||
suite "Migrations":
|
||||
test "migrate ok":
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
import results, testutils/unittests
|
||||
|
||||
import waku/node/peer_manager/peer_store/peer_storage, waku/waku_core/peers
|
||||
import
|
||||
logos_delivery/waku/node/peer_manager/peer_store/peer_storage,
|
||||
logos_delivery/waku/waku_core/peers
|
||||
|
||||
suite "PeerStorage":
|
||||
var peerStorage {.threadvar.}: PeerStorage
|
||||
|
||||
@@ -7,7 +7,9 @@ import
|
||||
eth/p2p/discoveryv5/enr,
|
||||
nimcrypto/utils
|
||||
|
||||
import waku/waku_core/peers, waku/node/peer_manager/peer_store/waku_peer_storage
|
||||
import
|
||||
logos_delivery/waku/waku_core/peers,
|
||||
logos_delivery/waku/node/peer_manager/peer_store/waku_peer_storage
|
||||
|
||||
proc `==`(a, b: RemotePeerInfo): bool =
|
||||
let comparisons = @[
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import std/options, results
|
||||
|
||||
import
|
||||
waku/node/peer_manager/[waku_peer_store, peer_store/waku_peer_storage],
|
||||
logos_delivery/waku/node/peer_manager/[waku_peer_store, peer_store/waku_peer_storage],
|
||||
../../../waku_archive/archive_utils
|
||||
|
||||
proc newTestWakuPeerStorage*(path: Option[string] = string.none()): WakuPeerStorage =
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import chronicles, std/[options, tables, strutils], chronos, testutils/unittests
|
||||
|
||||
import
|
||||
waku/node/waku_node,
|
||||
waku/waku_core,
|
||||
logos_delivery/waku/node/waku_node,
|
||||
logos_delivery/waku/waku_core,
|
||||
../../waku_lightpush/[lightpush_utils],
|
||||
../../testlib/[wakucore, wakunode, futures, testasync],
|
||||
waku/node/peer_manager/peer_manager
|
||||
logos_delivery/waku/node/peer_manager/peer_manager
|
||||
|
||||
suite "Peer Manager":
|
||||
suite "onPeerMetadata":
|
||||
|
||||
@@ -8,7 +8,7 @@ import
|
||||
libp2p/[peerstore, crypto/crypto]
|
||||
|
||||
import
|
||||
waku/[
|
||||
logos_delivery/waku/[
|
||||
waku_core,
|
||||
node/peer_manager,
|
||||
waku_node,
|
||||
|
||||
@@ -5,7 +5,7 @@ import
|
||||
import brokers/broker_context
|
||||
|
||||
import
|
||||
waku/[
|
||||
logos_delivery/waku/[
|
||||
waku_core,
|
||||
common/waku_protocol,
|
||||
node/waku_node,
|
||||
@@ -15,7 +15,6 @@ import
|
||||
node/health_monitor/protocol_health,
|
||||
node/health_monitor/topic_health,
|
||||
node/health_monitor/node_health_monitor,
|
||||
messaging_client,
|
||||
node/waku_node/relay,
|
||||
node/waku_node/store,
|
||||
node/waku_node/lightpush,
|
||||
@@ -26,7 +25,8 @@ import
|
||||
]
|
||||
|
||||
import ../testlib/[wakunode, wakucore], ../waku_archive/archive_utils
|
||||
import waku/node/subscription_manager
|
||||
import logos_delivery/waku/node/subscription_manager
|
||||
import logos_delivery/messaging/messaging_client
|
||||
|
||||
const MockDLow = 4 # Mocked GossipSub DLow value
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ import
|
||||
libp2p/crypto/crypto
|
||||
|
||||
import
|
||||
waku/[
|
||||
logos_delivery/waku/[
|
||||
waku_core,
|
||||
node/peer_manager,
|
||||
waku_node,
|
||||
|
||||
@@ -8,7 +8,8 @@ import
|
||||
libp2p/crypto/crypto
|
||||
|
||||
import
|
||||
waku/[waku_core, node/peer_manager, waku_node, waku_lightpush, waku_rln_relay],
|
||||
logos_delivery/waku/
|
||||
[waku_core, node/peer_manager, waku_node, waku_lightpush, waku_rln_relay],
|
||||
../testlib/[wakucore, wakunode, testasync, futures],
|
||||
../resources/payloads,
|
||||
../waku_rln_relay/[rln/waku_rln_relay_utils, utils_onchain]
|
||||
|
||||
@@ -13,7 +13,7 @@ import
|
||||
brokers/broker_context
|
||||
|
||||
import
|
||||
waku/
|
||||
logos_delivery/waku/
|
||||
[waku_node, discovery/waku_discv5, waku_peer_exchange, node/peer_manager, waku_core],
|
||||
../waku_peer_exchange/utils,
|
||||
../testlib/[wakucore, wakunode, testasync]
|
||||
|
||||
@@ -13,7 +13,7 @@ import
|
||||
from times import getTime, toUnix
|
||||
|
||||
import
|
||||
waku/[
|
||||
logos_delivery/waku/[
|
||||
waku_core,
|
||||
node/peer_manager,
|
||||
waku_node,
|
||||
|
||||
@@ -12,7 +12,7 @@ import
|
||||
from std/times import epochTime
|
||||
|
||||
import
|
||||
../../../waku/[
|
||||
../../../logos_delivery/waku/[
|
||||
node/peer_manager,
|
||||
waku_core,
|
||||
waku_node,
|
||||
@@ -28,7 +28,7 @@ import
|
||||
../resources/payloads,
|
||||
../waku_rln_relay/[utils_static, utils_onchain]
|
||||
|
||||
from ../../waku/waku_noise/noise_utils import randomSeqByte
|
||||
from ../../logos_delivery/waku/waku_noise/noise_utils import randomSeqByte
|
||||
|
||||
proc buildRandomIdentityCredentials(): IdentityCredential =
|
||||
# We generate a random identity credential (inter-value constrains are not enforced, otherwise we need to load e.g. zerokit RLN keygen)
|
||||
|
||||
@@ -11,7 +11,7 @@ import
|
||||
libp2p/protocols/pubsub/pubsub
|
||||
|
||||
import
|
||||
waku/[
|
||||
logos_delivery/waku/[
|
||||
waku_core/topics/pubsub_topic,
|
||||
waku_core/topics/sharding,
|
||||
waku_node,
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
import std/[options, sequtils, sets], testutils/unittests, chronos, libp2p/crypto/crypto
|
||||
|
||||
import
|
||||
waku/[
|
||||
logos_delivery/waku/[
|
||||
common/paging,
|
||||
waku_node,
|
||||
node/peer_manager,
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import std/options, results
|
||||
import
|
||||
waku/[node/peer_manager, node/waku_node, waku_enr/sharding, common/enr/typed_record],
|
||||
logos_delivery/waku/
|
||||
[node/peer_manager, node/waku_node, waku_enr/sharding, common/enr/typed_record],
|
||||
../testlib/[wakucore]
|
||||
|
||||
proc relayShards*(node: WakuNode): RelayShards =
|
||||
|
||||
Reference in New Issue
Block a user