diff --git a/library/storage_thread_requests/requests/node_debug_request.nim b/library/storage_thread_requests/requests/node_debug_request.nim index b01fd444..8d5fe2f4 100644 --- a/library/storage_thread_requests/requests/node_debug_request.nim +++ b/library/storage_thread_requests/requests/node_debug_request.nim @@ -61,6 +61,7 @@ proc getDebug( "addrs": node.switch.peerInfo.addrs.mapIt($it), "spr": nodeSpr.toURI, "announceAddresses": node.discovery.announceAddrs, + "dhtAddresses": node.discovery.dhtAddrs, "table": table, "nat": { "reachability": reachabilityStr(storage[].autonatService), diff --git a/openapi.yaml b/openapi.yaml index 3608cc75..c310efa2 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -106,6 +106,7 @@ components: - repo - spr - announceAddresses + - dhtAddresses - table - storage properties: @@ -124,6 +125,10 @@ components: type: array items: $ref: "#/components/schemas/MultiAddress" + dhtAddresses: + type: array + items: + $ref: "#/components/schemas/MultiAddress" table: $ref: "#/components/schemas/PeersTable" storage: diff --git a/storage/discovery.nim b/storage/discovery.nim index 87c88262..c7f17403 100644 --- a/storage/discovery.nim +++ b/storage/discovery.nim @@ -43,7 +43,7 @@ type Discovery* = ref object of RootObj 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 + dhtAddrs*: seq[MultiAddress] # UDP discovery addresses, exposed for debugging isStarted: bool store: Datastore @@ -191,12 +191,10 @@ proc announceDirectAddrs*( info "Updating announce and DHT records", tcpAddrs, udpAddrs d.announceAddrs = tcpAddrs + d.dhtAddrs = udpAddrs d.providerRecord = SignedPeerRecord .init(d.key, PeerRecord.init(d.peerId, tcpAddrs)) .expect("Should construct signed record").some - d.dhtRecord = SignedPeerRecord - .init(d.key, PeerRecord.init(d.peerId, udpAddrs)) - .expect("Should construct signed record").some if not d.protocol.isNil: let spr = SignedPeerRecord diff --git a/storage/rest/api.nim b/storage/rest/api.nim index 91edef58..c251d406 100644 --- a/storage/rest/api.nim +++ b/storage/rest/api.nim @@ -585,6 +585,7 @@ proc initDebugApi( "repo": $conf.dataDir, "spr": nodeSpr.toURI, "announceAddresses": node.discovery.announceAddrs, + "dhtAddresses": node.discovery.dhtAddrs, "table": table, "storage": {"version": $storageVersion, "revision": $storageRevision}, "nat": {