mirror of https://github.com/waku-org/nwaku.git
Remove unused imports
This commit is contained in:
parent
57c9ee1138
commit
971c7a262b
|
@ -10,7 +10,7 @@ import
|
|||
libp2p/transports/[transport, tcptransport],
|
||||
libp2p/muxers/[muxer, mplex/mplex, mplex/types],
|
||||
libp2p/protocols/[identify, secure/secure],
|
||||
libp2p/protocols/pubsub/[pubsub, gossipsub, floodsub],
|
||||
libp2p/protocols/pubsub/[pubsub, gossipsub],
|
||||
../../waku/protocol/v2/waku_protocol
|
||||
|
||||
when libp2p_secure == "noise":
|
||||
|
|
|
@ -3,8 +3,7 @@ import
|
|||
eth/common as eth_common, eth/keys,
|
||||
# XXX: Replace me
|
||||
../../protocol/v1/waku_protocol,
|
||||
../v1/rpc/[hexstrings, rpc_types, waku],
|
||||
rpc/wakurpc,
|
||||
../v1/rpc/[hexstrings, rpc_types],
|
||||
options as what # TODO: Huh? Redefinition?
|
||||
|
||||
from os import DirSep
|
||||
|
|
|
@ -1,13 +1,9 @@
|
|||
import
|
||||
json_rpc/rpcserver, tables, options,
|
||||
json_rpc/rpcserver, options,
|
||||
eth/[common, rlp, keys, p2p],
|
||||
../../../protocol/v2/waku_protocol,
|
||||
nimcrypto/[sysrand, hmac, sha2, pbkdf2],
|
||||
../../v1/rpc/[rpc_types, hexstrings, key_storage],
|
||||
../waku_types,
|
||||
libp2p/protocols/pubsub/pubsub
|
||||
|
||||
from stew/byteutils import hexToSeqByte, hexToByteArray
|
||||
nimcrypto/[sysrand, hmac, sha2],
|
||||
../waku_types
|
||||
|
||||
# Instead of using rlpx waku_protocol here, lets do mock waku2_protocol
|
||||
# This should wrap GossipSub, not use EthereumNode here
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
import
|
||||
strformat, os, osproc, net, confutils, strformat, chronicles, json,
|
||||
strformat, os, osproc, net, strformat, chronicles,
|
||||
libp2p/multiaddress,
|
||||
libp2p/crypto/crypto,
|
||||
libp2p/crypto/secp,
|
||||
libp2p/protocols/protocol,
|
||||
libp2p/peerinfo
|
||||
|
||||
# Fix ambiguous call error
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
import
|
||||
confutils, config, strutils, chronos, json_rpc/rpcserver, metrics,
|
||||
chronicles/topics_registry, # TODO: What? Need this for setLoglevel, weird.
|
||||
eth/[keys, p2p, async_utils], eth/net/nat,
|
||||
eth/p2p/[discovery, enode, peer_pool, bootnodes, whispernodes],
|
||||
# TODO remove me
|
||||
../v1/rpc/[wakusim, key_storage],
|
||||
eth/[keys, p2p], eth/net/nat,
|
||||
eth/p2p/[discovery, enode],
|
||||
libp2p/multiaddress,
|
||||
libp2p/crypto/crypto,
|
||||
libp2p/protocols/protocol,
|
||||
|
@ -196,7 +194,6 @@ proc run(config: WakuNodeConf) =
|
|||
# Optionally direct connect with a set of nodes
|
||||
if config.staticnodes.len > 0: connectToNodes(wakuProto, config.staticnodes)
|
||||
|
||||
### XXX: Fixup
|
||||
if config.logMetrics:
|
||||
proc logMetrics(udata: pointer) {.closure, gcsafe.} =
|
||||
{.gcsafe.}:
|
||||
|
@ -205,6 +202,7 @@ proc run(config: WakuNodeConf) =
|
|||
totalMessages = total_messages.value
|
||||
# NOTE: Just message volume for now, no valid/invalid envelopes
|
||||
info "Node metrics", connectedPeers, totalMessages
|
||||
# FIXME Warning: Use setTimer/clearTimer instead; addTimer is deprecated [Deprecated]
|
||||
addTimer(Moment.fromNow(2.seconds), logMetrics)
|
||||
addTimer(Moment.fromNow(2.seconds), logMetrics)
|
||||
|
||||
|
|
|
@ -70,9 +70,10 @@ method subscribeTopic*(w: WakuSub,
|
|||
debug "subscribeTopic", topic=topic, subscribe=subscribe, peerId=peerId
|
||||
procCall FloodSub(w).subscribeTopic(topic, subscribe, peerId)
|
||||
|
||||
# TODO: Decrement connected peers here
|
||||
# TODO: Fix decrement connected peers here or somewhere else
|
||||
method handleDisconnect*(w: WakuSub, peer: PubSubPeer) {.async.} =
|
||||
debug "handleDisconnect (NYI)"
|
||||
#connected_peers.dec()
|
||||
|
||||
method rpcHandler*(w: WakuSub,
|
||||
peer: PubSubPeer,
|
||||
|
|
Loading…
Reference in New Issue