mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 15:14:23 +01:00
listpeers: add features array using BOLT9 names.
It's actually not possible to currently tell if you're using anchor_outputs with a peer (since it depends on whether you both supported it at *channel open*). Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Changelog-added: JSON-RPC: `listpeers` shows `features` list for each channel.
This commit is contained in:
committed by
neil saitug
parent
932709cad9
commit
dd8cd81e91
@@ -154,6 +154,18 @@ void json_add_uncommitted_channel(struct json_stream *response,
|
||||
json_add_amount_msat_compat(response, total,
|
||||
"msatoshi_total", "total_msat");
|
||||
}
|
||||
|
||||
json_array_start(response, "features");
|
||||
if (feature_negotiated(uc->peer->ld->our_features,
|
||||
uc->peer->their_features,
|
||||
OPT_STATIC_REMOTEKEY))
|
||||
json_add_string(response, NULL, "option_static_remotekey");
|
||||
|
||||
if (feature_negotiated(uc->peer->ld->our_features,
|
||||
uc->peer->their_features,
|
||||
OPT_ANCHOR_OUTPUTS))
|
||||
json_add_string(response, NULL, "option_anchor_outputs");
|
||||
json_array_end(response);
|
||||
json_object_end(response);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user