From efe66f96897ef4424ef0ce5fbb2922e5cc0f7b17 Mon Sep 17 00:00:00 2001 From: niftynei Date: Wed, 19 Oct 2022 12:20:53 -0500 Subject: [PATCH] dual-fund: check features to print (anchors not assumed) --- lightningd/dual_open_control.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lightningd/dual_open_control.c b/lightningd/dual_open_control.c index 1743186bf..a39f7fb82 100644 --- a/lightningd/dual_open_control.c +++ b/lightningd/dual_open_control.c @@ -161,9 +161,14 @@ void json_add_unsaved_channel(struct json_stream *response, } json_array_start(response, "features"); - /* v2 channels assumed to have both static_remotekey + anchor_outputs */ + /* v2 channels assume static_remotekey */ json_add_string(response, NULL, "option_static_remotekey"); - json_add_string(response, NULL, "option_anchor_outputs"); + + if (feature_negotiated(channel->peer->ld->our_features, + channel->peer->their_features, + OPT_ANCHOR_OUTPUTS)) + json_add_string(response, NULL, "option_anchor_outputs"); + json_array_end(response); json_object_end(response); }