From 80a6d9b58e3f3dd9e5fbb2087c83cb717e1e5469 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Sat, 23 Jul 2022 16:25:48 +0930 Subject: [PATCH] lightningd: set the channel_type feature. AFAICT we should have been doing this since we started sending and receiving it, but didn't. Signed-off-by: Rusty Russell Changelog-Added: Protocol: we now advertize the `option_channel_type` feature (which we actually supported since v0.10.2) --- lightningd/lightningd.c | 1 + tests/test_misc.py | 2 ++ tests/utils.py | 4 ++-- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/lightningd/lightningd.c b/lightningd/lightningd.c index eccf43800..39e561e02 100644 --- a/lightningd/lightningd.c +++ b/lightningd/lightningd.c @@ -827,6 +827,7 @@ static struct feature_set *default_features(const tal_t *ctx) OPTIONAL_FEATURE(OPT_PAYMENT_METADATA), OPTIONAL_FEATURE(OPT_SCID_ALIAS), OPTIONAL_FEATURE(OPT_ZEROCONF), + OPTIONAL_FEATURE(OPT_CHANNEL_TYPE), #if EXPERIMENTAL_FEATURES OPTIONAL_FEATURE(OPT_ANCHOR_OUTPUTS), OPTIONAL_FEATURE(OPT_QUIESCE), diff --git a/tests/test_misc.py b/tests/test_misc.py index a29fc8778..9a7cf8738 100644 --- a/tests/test_misc.py +++ b/tests/test_misc.py @@ -1828,11 +1828,13 @@ def test_list_features_only(node_factory): expected += ['option_shutdown_anysegwit/odd'] expected += ['option_quiesce/odd'] expected += ['option_onion_messages/odd'] + expected += ['option_channel_type/odd'] expected += ['option_scid_alias/odd'] expected += ['option_zeroconf/odd'] expected += ['supports_open_accept_channel_type'] else: expected += ['option_shutdown_anysegwit/odd'] + expected += ['option_channel_type/odd'] expected += ['option_scid_alias/odd'] expected += ['option_zeroconf/odd'] assert features == expected diff --git a/tests/utils.py b/tests/utils.py index ce14fcbf1..799fbccf4 100644 --- a/tests/utils.py +++ b/tests/utils.py @@ -37,7 +37,7 @@ def hex_bits(features): def expected_peer_features(wumbo_channels=False, extra=[]): """Return the expected peer features hexstring for this configuration""" - features = [1, 5, 7, 8, 11, 13, 14, 17, 27, 47, 51] + features = [1, 5, 7, 8, 11, 13, 14, 17, 27, 45, 47, 51] if EXPERIMENTAL_FEATURES: # OPT_ONION_MESSAGES features += [39] @@ -59,7 +59,7 @@ def expected_peer_features(wumbo_channels=False, extra=[]): # features for the 'node' and the 'peer' feature sets def expected_node_features(wumbo_channels=False, extra=[]): """Return the expected node features hexstring for this configuration""" - features = [1, 5, 7, 8, 11, 13, 14, 17, 27, 47, 51, 55] + features = [1, 5, 7, 8, 11, 13, 14, 17, 27, 45, 47, 51, 55] if EXPERIMENTAL_FEATURES: # OPT_ONION_MESSAGES features += [39]