mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-02-22 14:42:40 +01:00
jsonrpc: Only print netaddr in getpeers when we know it
Fixes #285 Signed-off-by: Christian Decker <decker.christian@gmail.com>
This commit is contained in:
parent
956350e62e
commit
89f016f524
1 changed files with 4 additions and 3 deletions
|
@ -842,6 +842,7 @@ static void gossipd_getpeers_complete(struct subd *gossip, const u8 *msg,
|
|||
list_for_each(&gpa->cmd->ld->peers, p, list) {
|
||||
json_object_start(response, NULL);
|
||||
json_add_string(response, "state", peer_state_name(p->state));
|
||||
if (p->addr.type != ADDR_TYPE_PADDING)
|
||||
json_add_string(response, "netaddr",
|
||||
type_to_string(response, struct wireaddr,
|
||||
&p->addr));
|
||||
|
|
Loading…
Add table
Reference in a new issue