enhancement/cleanup-warnings (#290)

This commit is contained in:
Dean Eigenmann 2020-11-20 14:59:29 +01:00 committed by GitHub
parent 010408aadb
commit 1193b69d6c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 9 additions and 18 deletions

View File

@ -3,7 +3,7 @@ import
std/[unittest, options, tables, sets],
chronos, chronicles,
../../waku/v2/node/message_store,
../test_helpers, ./utils,
./utils,
../../waku/v2/waku_types
suite "Message Store":

View File

@ -8,9 +8,7 @@ import
libp2p/stream/[bufferstream, connection],
libp2p/crypto/crypto,
libp2p/multistream,
libp2p/transports/transport,
libp2p/transports/tcptransport,
../../waku/v2/protocol/[waku_relay, waku_filter, message_notifier],
../../waku/v2/protocol/[waku_filter, message_notifier],
../../waku/v2/waku_types,
../test_helpers, ./utils

View File

@ -8,15 +8,11 @@ import
libp2p/stream/[bufferstream, connection],
libp2p/crypto/crypto,
libp2p/protocols/pubsub/rpc/message,
libp2p/multistream,
libp2p/transports/transport,
libp2p/transports/tcptransport,
../../waku/v2/protocol/[waku_store, message_notifier],
../../waku/v2/node/message_store,
../test_helpers, ./utils,
../../waku/v2/waku_types
procSuite "Waku Store":
asyncTest "handle query":
let

View File

@ -112,7 +112,7 @@ procSuite "WakuNode":
await sleepAsync(2000.millis)
# Connect peers by dialing from node2 to node1
let conn = await node2.switch.dial(node1.peerInfo, WakuRelayCodec)
let conn = await node2.switch.dial(node1.peerInfo.peerId, node1.peerInfo.addrs, WakuRelayCodec)
# We need to sleep to allow the subscription to go through
info "Going to sleep to allow subscribe to go through"

View File

@ -7,11 +7,8 @@ import random
import chronos
import libp2p/[standard_setup,
protocols/pubsub/pubsub,
protocols/pubsub/floodsub,
protocols/pubsub/gossipsub,
protocols/secure/secure]
import ../../waku/v2/protocol/waku_relay,
../../waku/v2/waku_types
import ../../waku/v2/waku_types
export standard_setup

View File

@ -312,7 +312,7 @@ proc dialPeer*(n: WakuNode, address: string) {.async.} =
# TODO Keep track of conn and connected state somewhere (WakuRelay?)
#p.conn = await p.switch.dial(remotePeer, WakuRelayCodec)
#p.connected = true
discard await n.switch.dial(remotePeer, WakuRelayCodec)
discard await n.switch.dial(remotePeer.peerId, remotePeer.addrs, WakuRelayCodec)
info "Post switch dial"
proc setStorePeer*(n: WakuNode, address: string) =
@ -346,7 +346,7 @@ proc connectToNodes*(n: WakuNode, nodes: seq[string]) {.async.} =
proc connectToNodes*(n: WakuNode, nodes: seq[PeerInfo]) {.async.} =
for peerInfo in nodes:
info "connectToNodes", peer = peerInfo
discard await n.switch.dial(peerInfo, WakuRelayCodec)
discard await n.switch.dial(peerInfo.peerId, peerInfo.addrs, WakuRelayCodec)
# The issue seems to be around peers not being fully connected when
# trying to subscribe. So what we do is sleep to guarantee nodes are

View File

@ -1,5 +1,5 @@
import
std/[tables, sequtils, future, algorithm, options],
std/[tables, sequtils, algorithm, options],
bearssl,
chronos, chronicles, metrics, stew/[results,byteutils],
libp2p/switch,

View File

@ -22,9 +22,9 @@
##
import
std/[tables, sequtils, future, algorithm, options],
std/[tables, options],
bearssl,
chronos, chronicles, metrics, stew/[results,byteutils],
chronos, chronicles, metrics, stew/results,
libp2p/switch,
libp2p/crypto/crypto,
libp2p/protocols/protocol,