Move out WakuProto to waku_types

This commit is contained in:
Oskar Thoren 2020-05-22 14:12:05 +08:00
parent e0a7de170a
commit dd4a1615f1
No known key found for this signature in database
GPG Key ID: B2ECCFD3BC2EF77E
3 changed files with 15 additions and 12 deletions

View File

@ -5,7 +5,8 @@ import
# ../../../protocol/v1/waku_protocol,
../../../protocol/v2/waku_protocol,
nimcrypto/[sysrand, hmac, sha2, pbkdf2],
../../v1/rpc/[rpc_types, hexstrings, key_storage]
../../v1/rpc/[rpc_types, hexstrings, key_storage],
../waku_types
from stew/byteutils import hexToSeqByte, hexToByteArray

View File

@ -0,0 +1,11 @@
import libp2p/multiaddress,
libp2p/crypto/crypto,
libp2p/protocols/protocol,
libp2p/peerinfo,
../../tests/v2/standard_setup
type WakuProto* = ref object of LPProtocol
switch*: Switch
conn*: Connection
connected*: bool
started*: bool

View File

@ -12,10 +12,8 @@ import
rpc/wakurpc,
../../protocol/v2/waku_protocol,
# TODO: Pull out standard switch from tests
../../tests/v2/standard_setup
# TODO: Use
# protocol/waku_protocol
../../tests/v2/standard_setup,
waku_types
# key and crypto modules different
type
@ -23,13 +21,6 @@ type
PublicKey* = crypto.PublicKey
PrivateKey* = crypto.PrivateKey
# handler defined in parent object
type WakuProto = ref object of LPProtocol
switch: Switch
conn: Connection
connected: bool
started: bool
const clientId = "Nimbus waku node"
let globalListeningAddr = parseIpAddress("0.0.0.0")