mirror of
https://github.com/aljazceru/lightning.git
synced 2026-01-30 11:14:20 +01:00
jsonrpc: Add aliases to listpeers result
This commit is contained in:
@@ -744,6 +744,17 @@ static void json_add_channel(struct lightningd *ld,
|
||||
json_add_string(response, "closer", channel->closer == LOCAL ?
|
||||
"local" : "remote");
|
||||
|
||||
if (channel->alias[LOCAL] || channel->alias[REMOTE]) {
|
||||
json_object_start(response, "alias");
|
||||
if (channel->alias[LOCAL])
|
||||
json_add_short_channel_id(response, "local",
|
||||
channel->alias[LOCAL]);
|
||||
if (channel->alias[REMOTE])
|
||||
json_add_short_channel_id(response, "remote",
|
||||
channel->alias[REMOTE]);
|
||||
json_object_end(response);
|
||||
}
|
||||
|
||||
json_array_start(response, "features");
|
||||
if (channel_has(channel, OPT_STATIC_REMOTEKEY))
|
||||
json_add_string(response, NULL, "option_static_remotekey");
|
||||
|
||||
Reference in New Issue
Block a user