From a229e910a0adebb79e2a5e653474f797b4081e5f Mon Sep 17 00:00:00 2001 From: Oskar Thoren Date: Thu, 28 May 2020 11:27:01 +0800 Subject: [PATCH] Remove unused stuff from wakunode --- waku/node/v2/wakunode.nim | 80 --------------------------------------- 1 file changed, 80 deletions(-) diff --git a/waku/node/v2/wakunode.nim b/waku/node/v2/wakunode.nim index 7f2005875..114a0245a 100644 --- a/waku/node/v2/wakunode.nim +++ b/waku/node/v2/wakunode.nim @@ -208,86 +208,6 @@ proc run(config: WakuNodeConf) = runForever() - - # Here directchat uses rwLoop for protocol - # What if we dial here? How dial? - # Feels very ghetto, this hookup - - # Once we have a switch and started it, we need to connect the them - # Then we can dial a peer on a protocol - - # If we start node 2 this should do: - # let conn = switch.dial(peerInfo, WakuCodec) - # (testswitch.nim) Conn write hello - # Aight so we calling here, but where - # This is why nice to have RPC - how does this look in libp2p? - - # Is this doable with RPC in DevP2P? Probably. How? For quicksim - # (quicksim.nim) Basically RPC HTTP Client and connect - - # Ok, now what? Quick break. Probably RPC etc? Try to dial, 1:1 style - # Also not actually using GossipSub so far - # We want to dial with another node - - # Set-up node -# var node = newEthereumNode(config.nodekey, address, 1, nil, clientId, -# addAllCapabilities = false) -# if not config.bootnodeOnly: -# node.addCapability Waku # Always enable Waku protocol -# var topicInterest: Option[seq[waku_protocol.Topic]] -# var bloom: Option[Bloom] -# if config.wakuTopicInterest: -# var topics: seq[waku_protocol.Topic] -# topicInterest = some(topics) -# else: -# bloom = some(fullBloom()) -# let wakuConfig = WakuConfig(powRequirement: config.wakuPow, -# bloom: bloom, -# isLightNode: config.lightNode, -# maxMsgSize: waku_protocol.defaultMaxMsgSize, -# topics: topicInterest) -# node.configureWaku(wakuConfig) -# if config.whisper or config.whisperBridge: -# node.addCapability Whisper -# node.protocolState(Whisper).config.powRequirement = 0.002 -# if config.whisperBridge: -# node.shareMessageQueue() -# -# # TODO: Status fleet bootnodes are discv5? That will not work. -# let bootnodes = if config.bootnodes.len > 0: setBootNodes(config.bootnodes) -# elif config.fleet == prod: setBootNodes(StatusBootNodes) -# elif config.fleet == staging: setBootNodes(StatusBootNodesStaging) -# elif config.fleet == test : setBootNodes(StatusBootNodesTest) -# else: @[] -# -# traceAsyncErrors node.connectToNetwork(bootnodes, not config.noListen, -# config.discovery) -# -# if not config.bootnodeOnly: -# # Optionally direct connect with a set of nodes -# if config.staticnodes.len > 0: connectToNodes(node, config.staticnodes) -# elif config.fleet == prod: connectToNodes(node, WhisperNodes) -# elif config.fleet == staging: connectToNodes(node, WhisperNodesStaging) -# elif config.fleet == test: connectToNodes(node, WhisperNodesTest) -# -# if config.rpc: -# let ta = initTAddress(config.rpcAddress, -# Port(config.rpcPort + config.portsShift)) -# var rpcServer = newRpcHttpServer([ta]) -# let keys = newKeyStorage() -# setupWakuRPC(node, keys, rpcServer) -# setupWakuSimRPC(node, rpcServer) -# rpcServer.start() -# -# when defined(insecure): -# if config.metricsServer: -# let -# address = config.metricsServerAddress -# port = config.metricsServerPort + config.portsShift -# info "Starting metrics HTTP server", address, port -# metrics.startHttpServer($address, Port(port)) - - when isMainModule: let conf = WakuNodeConf.load() run(conf)