mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 15:14:23 +01:00
listpeers: expose peer features as 'local_features' and 'global_features'
For now, just the connected peers. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
committed by
Christian Decker
parent
7b735fbeee
commit
9fa738a741
@@ -708,6 +708,16 @@ static void json_add_node_decoration(struct json_result *response,
|
||||
{
|
||||
struct json_escaped *esc;
|
||||
|
||||
if (node->local_features)
|
||||
json_add_hex(response, "local_features",
|
||||
node->local_features,
|
||||
tal_len(node->local_features));
|
||||
|
||||
if (node->global_features)
|
||||
json_add_hex(response, "global_features",
|
||||
node->global_features,
|
||||
tal_len(node->global_features));
|
||||
|
||||
/* If node announcement hasn't been received yet, no alias information.
|
||||
*/
|
||||
if (node->last_timestamp < 0)
|
||||
@@ -780,6 +790,7 @@ static void gossipd_getpeers_complete(struct subd *gossip, const u8 *msg,
|
||||
json_array_start(response, "channels");
|
||||
json_add_uncommitted_channel(response, p->uncommitted_channel);
|
||||
|
||||
/* FIXME: Add their local and global features */
|
||||
list_for_each(&p->channels, channel, list) {
|
||||
struct channel_id cid;
|
||||
u64 our_reserve_msat = channel->channel_info.their_config.channel_reserve_satoshis * 1000;
|
||||
|
||||
Reference in New Issue
Block a user