Skip to content

Commit

Permalink
cli: getinfo output to regard --ip-discovery
Browse files Browse the repository at this point in the history
  • Loading branch information
m-schmoock committed Jan 3, 2023
1 parent 6a2e440 commit d0cab87
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lightningd/peer_control.c
Original file line number Diff line number Diff line change
Expand Up @@ -2286,10 +2286,10 @@ static struct command_result *json_getinfo(struct command *cmd,
for (size_t i = 0; i < count_announceable; i++)
json_add_address(response, NULL, cmd->ld->announceable+i);

/* Currently, IP discovery will only be announced by gossipd,
* if we don't already have usable addresses.
* See `create_node_announcement` in `gossip_generation.c`. */
if (count_announceable == 0) {
/* Add discovered IPs if we announce them.
* Also see `create_node_announcement` in `gossip_generation.c`. */
if ((cmd->ld->config.ip_discovery == OPT_AUTOBOOL_AUTO && count_announceable == 0) ||
cmd->ld->config.ip_discovery == OPT_AUTOBOOL_TRUE) {
if (cmd->ld->discovered_ip_v4 != NULL &&
!wireaddr_arr_contains(
cmd->ld->announceable,
Expand Down

0 comments on commit d0cab87

Please sign in to comment.