Skip to content

Commit 4f49143

Browse files
rustyrussellShahanaFarooqui
authored andcommitted
openingd: don't ask for scid_alias in channel type if remote doesn't tell us they support it.
This is actually totally fair, and LND, which does not support it without an option, rejects. Thanks to Vincenzo and roasbeef for debugging this for me! Fixes: #7221 Changelog-Fixed: Protocol: we can now open unannounced channels with LND nodes again. Signed-off-by: Rusty Russell <[email protected]>
1 parent 4ac85b2 commit 4f49143

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

openingd/openingd.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -342,10 +342,11 @@ static u8 *funder_channel_start(struct state *state, u8 channel_flags,
342342
* But:
343343
* 1. We didn't accept this in CLN prior to v23.05.
344344
* 2. LND won't accept that without OPT_ANCHORS_ZERO_FEE_HTLC_TX.
345-
*
346-
* So we keep it off for now, until anchors merge.
345+
* 3. LND <= 18 won't accept OPT_SCID_ALIAS unless it advertizes it,
346+
* which it does not by default.
347347
*/
348-
if (channel_type_has(state->channel_type, OPT_ANCHORS_ZERO_FEE_HTLC_TX)) {
348+
if (channel_type_has(state->channel_type, OPT_ANCHORS_ZERO_FEE_HTLC_TX)
349+
&& feature_offered(state->their_features, OPT_SCID_ALIAS)) {
349350
if (!(channel_flags & CHANNEL_FLAGS_ANNOUNCE_CHANNEL))
350351
channel_type_set_scid_alias(state->channel_type);
351352
}

0 commit comments

Comments
 (0)