bolt7: allow announcement of ADDR_TYPE_DNS

This commit is contained in:
Michael Schmoock
2021-10-01 13:47:29 +02:00
committed by Rusty Russell
parent 25bd09716f
commit 01e8a523e9
12 changed files with 111 additions and 35 deletions

View File

@@ -281,6 +281,10 @@ void json_add_address(struct json_stream *response, const char *fieldname,
json_add_string(response, "type", "torv3");
json_add_string(response, "address", fmt_wireaddr_without_port(tmpctx, addr));
json_add_num(response, "port", addr->port);
} else if (addr->type == ADDR_TYPE_DNS) {
json_add_string(response, "type", "dns");
json_add_string(response, "address", fmt_wireaddr_without_port(tmpctx, addr));
json_add_num(response, "port", addr->port);
} else if (addr->type == ADDR_TYPE_WEBSOCKET) {
json_add_string(response, "type", "websocket");
json_add_num(response, "port", addr->port);