Refactor: Put waku_type content where it belongs (#333)

- Separate out types and methods into appropriate module
- Add util folder for small utils used in multiple independent places
- Update paths
This commit is contained in:
Oskar Thorén
2021-01-06 17:35:05 +08:00
committed by GitHub
parent f6f6057c49
commit 37a3a4fadd
38 changed files with 144 additions and 152 deletions
+1 -5
View File
@@ -10,11 +10,7 @@ import
json_rpc/[rpcclient, rpcserver],
../../waku/v2/node/[config, wakunode2],
../../waku/common/utils/nat,
../../waku/v2/waku_types
type
Topic* = waku_types.Topic
../../waku/v2/protocol/waku_message
# Node operations happens asynchronously
proc runBackground() {.async.} =
+3 -4
View File
@@ -19,11 +19,10 @@ import libp2p/[switch, # manage transports, a single entry poi
muxers/muxer, # define an interface for stream multiplexing, allowing peers to offer many protocols over a single connection
muxers/mplex/mplex] # define some contants and message types for stream multiplexing
import ../../waku/v2/node/[config, wakunode2, waku_payload],
../../waku/v2/protocol/[waku_relay],
../../waku/v2/protocol/[waku_relay, waku_message],
../../waku/v2/protocol/waku_store/waku_store,
../../waku/v2/protocol/waku_filter/waku_filter,
../../waku/common/utils/nat,
../../waku/v2/waku_types
../../waku/common/utils/nat
const Help = """
Commands: /[?|help|connect|disconnect|exit]
@@ -52,7 +51,7 @@ type Chat = ref object
type
PrivateKey* = crypto.PrivateKey
Topic* = waku_types.Topic
Topic* = wakunode2.Topic
# Similarly as Status public chats now.