diff --git a/tools/README.md b/tools/README.md index a49b5d968..7756e4113 100644 --- a/tools/README.md +++ b/tools/README.md @@ -3,6 +3,7 @@ Attempts to dial a peer and asserts it supports a given set of protocols. ```console +./build/wakucanary --help Usage: wakucanary [OPTIONS]... @@ -14,6 +15,7 @@ The following options are available: -p, --protocol Protocol required to be supported: store,relay,lightpush,filter (can be used multiple times). -l, --log-level Sets the log level [=LogLevel.DEBUG]. + -np, --node-port Listening port for waku node [=60000]. ``` The tool can be built as: diff --git a/tools/wakucanary/wakucanary.nim b/tools/wakucanary/wakucanary.nim index 9f176f08d..86d43ef25 100644 --- a/tools/wakucanary/wakucanary.nim +++ b/tools/wakucanary/wakucanary.nim @@ -50,6 +50,12 @@ type name: "log-level", abbr: "l" .}: LogLevel + nodePort* {. + desc: "Listening port for waku node", + defaultValue: 60000, + name: "node-port", + abbr: "np" }: uint16 + proc parseCmdArg*(T: type chronos.Duration, p: string): T = try: @@ -112,7 +118,7 @@ proc main(): Future[int] {.async.} = node = WakuNode.new( nodeKey, ValidIpAddress.init("0.0.0.0"), - Port(60000), + Port(conf.nodePort), nameResolver = resolver) await node.start()