mirror of
https://github.com/logos-messaging/logos-messaging-nim.git
synced 2026-08-27 00:11:10 +00:00
Folder restructure (#274)
* Change folder structure to {v1,v2,common}/...
Addresses https://github.com/status-im/nim-waku/issues/261
* Update waku.nimble paths
* Flatten paths
* Fix import paths
* Pull out utils folder for nat
* Pull out waku_types to top level for v2
* Fix test import paths
* Remove old READMEs and replace with one liner
* Update README and split v1 and v2
* Skeleton READMEs
* Update README.md
Co-authored-by: Kim De Mey <kim.demey@gmail.com>
* Update README.md
Co-authored-by: Kim De Mey <kim.demey@gmail.com>
Co-authored-by: Kim De Mey <kim.demey@gmail.com>
This commit is contained in:
co-authored by
Kim De Mey
parent
d46f357495
commit
9518322198
@@ -4,13 +4,13 @@ import
|
||||
std/[unittest, options, os, strutils],
|
||||
stew/byteutils, json_rpc/[rpcserver, rpcclient],
|
||||
eth/common as eth_common, eth/[rlp, keys, p2p],
|
||||
../../waku/protocol/v1/waku_protocol,
|
||||
../../waku/node/v1/rpc/[hexstrings, rpc_types, waku, key_storage]
|
||||
../../waku/v1/protocol/waku_protocol,
|
||||
../../waku/v1/node/rpc/[hexstrings, rpc_types, waku, key_storage]
|
||||
|
||||
template sourceDir*: string = currentSourcePath.rsplit(DirSep, 1)[0]
|
||||
## Generate client convenience marshalling wrappers from forward declarations
|
||||
## For testing, ethcallsigs needs to be kept in sync with ../waku/node/v1/rpc/waku
|
||||
const sigPath = sourceDir / ParDir / ParDir / "waku" / "node" / "v1" / "rpc" / "wakucallsigs.nim"
|
||||
const sigPath = sourceDir / ParDir / ParDir / "waku" / "v1" / "node" / "rpc" / "wakucallsigs.nim"
|
||||
createRpcSigs(RpcSocketClient, sigPath)
|
||||
|
||||
proc setupNode(capabilities: varargs[ProtocolInfo, `protocolInfo`],
|
||||
|
||||
@@ -12,8 +12,8 @@ import
|
||||
std/[sequtils, unittest, tables],
|
||||
chronos, eth/p2p, eth/p2p/peer_pool,
|
||||
eth/p2p/rlpx_protocols/whisper_protocol as whisper,
|
||||
../../waku/protocol/v1/waku_protocol as waku,
|
||||
../../waku/protocol/v1/waku_bridge,
|
||||
../../waku/v1/protocol/waku_protocol as waku,
|
||||
../../waku/v1/protocol/waku_bridge,
|
||||
../test_helpers
|
||||
|
||||
let safeTTL = 5'u32
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
import
|
||||
std/[sequtils, options, unittest, times],
|
||||
../../waku/protocol/v1/waku_protocol
|
||||
../../waku/v1/protocol/waku_protocol
|
||||
|
||||
suite "Waku envelope validation":
|
||||
test "should validate and allow envelope according to config":
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
import
|
||||
std/[sequtils, tables, unittest],
|
||||
chronos, eth/[keys, p2p], eth/p2p/peer_pool,
|
||||
../../waku/protocol/v1/waku_protocol,
|
||||
../../waku/v1/protocol/waku_protocol,
|
||||
../test_helpers
|
||||
|
||||
const
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
import
|
||||
std/[unittest, tables, sequtils, times],
|
||||
chronos, eth/[p2p, async_utils], eth/p2p/peer_pool,
|
||||
../../waku/protocol/v1/[waku_protocol, waku_mail],
|
||||
../../waku/v1/protocol/[waku_protocol, waku_mail],
|
||||
../test_helpers
|
||||
|
||||
const
|
||||
|
||||
@@ -2,8 +2,9 @@
|
||||
import
|
||||
std/[unittest, options, tables, sets],
|
||||
chronos, chronicles,
|
||||
../../waku/node/v2/[waku_types, message_store],
|
||||
../test_helpers, ./utils
|
||||
../../waku/v2/node/message_store,
|
||||
../test_helpers, ./utils,
|
||||
../../waku/v2/waku_types
|
||||
|
||||
suite "Message Store":
|
||||
test "set and get works":
|
||||
|
||||
@@ -5,13 +5,15 @@ import
|
||||
stew/shims/net as stewNet,
|
||||
json_rpc/[rpcserver, rpcclient],
|
||||
libp2p/crypto/crypto,
|
||||
../../waku/node/v2/[waku_types, wakunode2],
|
||||
../../waku/node/v2/rpc/wakurpc,
|
||||
../../waku/protocol/v2/waku_relay,
|
||||
../../waku/v2/node/wakunode2,
|
||||
../../waku/v2/node/rpc/wakurpc,
|
||||
../../waku/v2/protocol/waku_relay,
|
||||
../../waku/v2/waku_types,
|
||||
../test_helpers
|
||||
|
||||
|
||||
template sourceDir*: string = currentSourcePath.rsplit(DirSep, 1)[0]
|
||||
const sigPath = sourceDir / ParDir / ParDir / "waku" / "node" / "v2" / "rpc" / "wakucallsigs.nim"
|
||||
const sigPath = sourceDir / ParDir / ParDir / "waku" / "v2" / "node" / "rpc" / "wakucallsigs.nim"
|
||||
createRpcSigs(RpcHttpClient, sigPath)
|
||||
|
||||
suite "Waku v2 Remote Procedure Calls":
|
||||
|
||||
@@ -17,7 +17,7 @@ import utils,
|
||||
libp2p/stream/[bufferstream, connection],
|
||||
libp2p/crypto/crypto,
|
||||
libp2p/protocols/pubsub/floodsub
|
||||
import ../../waku/protocol/v2/waku_relay
|
||||
import ../../waku/v2/protocol/waku_relay
|
||||
|
||||
import ../test_helpers
|
||||
|
||||
|
||||
@@ -10,8 +10,8 @@ import
|
||||
libp2p/multistream,
|
||||
libp2p/transports/transport,
|
||||
libp2p/transports/tcptransport,
|
||||
../../waku/protocol/v2/[waku_relay, waku_filter, message_notifier],
|
||||
../../waku/node/v2/waku_types,
|
||||
../../waku/v2/protocol/[waku_relay, waku_filter, message_notifier],
|
||||
../../waku/v2/waku_types,
|
||||
../test_helpers, ./utils
|
||||
|
||||
procSuite "Waku Filter":
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
import
|
||||
std/[unittest,algorithm,options],
|
||||
nimcrypto/sha2,
|
||||
../../waku/node/v2/waku_types,
|
||||
../../waku/protocol/v2/waku_store,
|
||||
../../waku/v2/waku_types,
|
||||
../../waku/v2/protocol/waku_store,
|
||||
../test_helpers
|
||||
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
import
|
||||
std/unittest,
|
||||
../../waku/node/v2/waku_payload,
|
||||
../../waku/v2/node/waku_payload,
|
||||
../test_helpers
|
||||
|
||||
procSuite "Waku Payload":
|
||||
|
||||
@@ -11,9 +11,10 @@ import
|
||||
libp2p/multistream,
|
||||
libp2p/transports/transport,
|
||||
libp2p/transports/tcptransport,
|
||||
../../waku/protocol/v2/[waku_store, message_notifier],
|
||||
../../waku/node/v2/[waku_types, message_store],
|
||||
../test_helpers, ./utils
|
||||
../../waku/v2/protocol/[waku_store, message_notifier],
|
||||
../../waku/v2/node/message_store,
|
||||
../test_helpers, ./utils,
|
||||
../../waku/v2/waku_types
|
||||
|
||||
|
||||
procSuite "Waku Store":
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import
|
||||
std/[unittest, options, tables, sets],
|
||||
chronos, chronicles,
|
||||
../../waku/protocol/v2/waku_swap,
|
||||
../../waku/node/v2/waku_types,
|
||||
../../waku/v2/protocol/waku_swap,
|
||||
../../waku/v2/waku_types,
|
||||
../test_helpers, ./utils
|
||||
|
||||
procSuite "Waku SWAP Accounting":
|
||||
|
||||
@@ -7,9 +7,10 @@ import
|
||||
libp2p/crypto/secp,
|
||||
libp2p/switch,
|
||||
eth/keys,
|
||||
../../waku/protocol/v2/[waku_relay, waku_store, waku_filter, message_notifier],
|
||||
../../waku/node/v2/[wakunode2, waku_types],
|
||||
../test_helpers
|
||||
../../waku/v2/protocol/[waku_relay, waku_store, waku_filter, message_notifier],
|
||||
../../waku/v2/node/wakunode2,
|
||||
../test_helpers,
|
||||
../../waku/v2/waku_types
|
||||
|
||||
procSuite "WakuNode":
|
||||
let rng = keys.newRng()
|
||||
|
||||
+2
-2
@@ -10,8 +10,8 @@ import libp2p/[standard_setup,
|
||||
protocols/pubsub/floodsub,
|
||||
protocols/pubsub/gossipsub,
|
||||
protocols/secure/secure]
|
||||
import ../../waku/protocol/v2/waku_relay,
|
||||
../../waku/node/v2/waku_types
|
||||
import ../../waku/v2/protocol/waku_relay,
|
||||
../../waku/v2/waku_types
|
||||
|
||||
export standard_setup
|
||||
|
||||
|
||||
Reference in New Issue
Block a user