deploy: d49c95f6a142bde8cd607ca333eade5c405cf59a

This commit is contained in:
rshiv 2021-11-24 16:14:07 +00:00
parent e846609ac7
commit 35f3a439c0
3 changed files with 8 additions and 6 deletions

View File

@ -63,7 +63,7 @@ procSuite "Waku v2 JSON-RPC API":
let response = await client.get_waku_v2_debug_v1_info()
check:
response.listenStr == $node.peerInfo.addrs[^1] & "/p2p/" & $node.peerInfo.peerId
response.listenAddresses == @[$node.peerInfo.addrs[^1] & "/p2p/" & $node.peerInfo.peerId]
server.stop()
server.close()

View File

@ -2,7 +2,7 @@
# libtool - Provide generalized library-building support services.
# Generated automatically by config.status (libbacktrace) version-unused
# Libtool was configured on host fv-az190-306:
# Libtool was configured on host fv-az196-961:
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
#
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,

View File

@ -68,7 +68,7 @@ type
WakuInfo* = object
# NOTE One for simplicity, can extend later as needed
listenStr*: string
listenAddresses*: seq[string]
#multiaddrStrings*: seq[string]
# NOTE based on Eth2Node in NBC eth2_network.nim
@ -392,10 +392,12 @@ proc info*(node: WakuNode): WakuInfo =
## Status: Implemented.
##
# TODO Generalize this for other type of multiaddresses
let peerInfo = node.peerInfo
let listenStr = $peerInfo.addrs[^1] & "/p2p/" & $peerInfo.peerId
let wakuInfo = WakuInfo(listenStr: listenStr)
var listenStr : seq[string]
for address in node.announcedAddresses:
var fulladdr = $address & "/p2p/" & $peerInfo.peerId
listenStr &= fulladdr
let wakuInfo = WakuInfo(listenAddresses: listenStr)
return wakuInfo
proc mountFilter*(node: WakuNode) {.raises: [Defect, KeyError, LPError]} =