Debug/info shows announce addresses (#610)
* Shows announce addresses in debug/info endpoint. * Shows announce addresses in debug/info endpoint.
This commit is contained in:
parent
cb02962231
commit
80e2ef4eb5
|
@ -36,7 +36,7 @@ type
|
|||
protocol*: discv5.Protocol # dht protocol
|
||||
key: PrivateKey # private key
|
||||
peerId: PeerId # the peer id of the local node
|
||||
announceAddrs: seq[MultiAddress] # addresses announced as part of the provider records
|
||||
announceAddrs*: seq[MultiAddress] # addresses announced as part of the provider records
|
||||
providerRecord*: ?SignedPeerRecord # record to advertice node connection information, this carry any
|
||||
# address that the node can be connected on
|
||||
dhtRecord*: ?SignedPeerRecord # record to advertice DHT connection information
|
||||
|
|
|
@ -298,6 +298,7 @@ proc initDebugApi(node: CodexNodeRef, conf: CodexConf, router: var RestRouter) =
|
|||
node.discovery.dhtRecord.get.toURI
|
||||
else:
|
||||
"",
|
||||
"announceAddresses": node.discovery.announceAddrs,
|
||||
"table": table,
|
||||
"codex": {
|
||||
"version": $codexVersion,
|
||||
|
|
|
@ -108,3 +108,6 @@ func `%`*(obj: dn.Address): JsonNode =
|
|||
|
||||
func `%`*(obj: AddressInfo): JsonNode =
|
||||
% $obj.address
|
||||
|
||||
func `%`*(obj: MultiAddress): JsonNode =
|
||||
% $obj
|
||||
|
|
Loading…
Reference in New Issue