Remove unused stuff from wakunode

This commit is contained in:
Oskar Thoren 2020-05-28 11:27:01 +08:00
parent 063a57d583
commit a229e910a0
No known key found for this signature in database
GPG Key ID: B2ECCFD3BC2EF77E
1 changed files with 0 additions and 80 deletions

View File

@ -208,86 +208,6 @@ proc run(config: WakuNodeConf) =
runForever() 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: when isMainModule:
let conf = WakuNodeConf.load() let conf = WakuNodeConf.load()
run(conf) run(conf)