mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-03-15 20:09:18 +01:00
jsonrpc: adds dynamicaly detected IP addresses to getinfo
Changelog-Fixed: JSON-RPC: Adds dynamically detected public IP addresses to `getinfo`
This commit is contained in:
parent
55cf413fc3
commit
32c4540fc0
1 changed files with 6 additions and 0 deletions
|
@ -2014,6 +2014,12 @@ static struct command_result *json_getinfo(struct command *cmd,
|
|||
json_array_start(response, "address");
|
||||
for (size_t i = 0; i < tal_count(cmd->ld->announceable); i++)
|
||||
json_add_address(response, NULL, cmd->ld->announceable+i);
|
||||
if (cmd->ld->remote_addr_v4 != NULL &&
|
||||
!wireaddr_arr_contains(cmd->ld->announceable, cmd->ld->remote_addr_v4))
|
||||
json_add_address(response, NULL, cmd->ld->remote_addr_v4);
|
||||
if (cmd->ld->remote_addr_v6 != NULL &&
|
||||
!wireaddr_arr_contains(cmd->ld->announceable, cmd->ld->remote_addr_v6))
|
||||
json_add_address(response, NULL, cmd->ld->remote_addr_v6);
|
||||
json_array_end(response);
|
||||
|
||||
/* This is what we're actually bound to. */
|
||||
|
|
Loading…
Add table
Reference in a new issue