features: EXPERIMENTAL_FEATURES: advertize option_quiesce

The latest draft has a feature bit here.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2021-10-08 10:01:04 +10:30
committed by Christian Decker
parent 1d14c7ee3d
commit 55dbe82162
5 changed files with 16 additions and 1 deletions

View File

@@ -88,6 +88,10 @@ static const struct feature_style feature_styles[] = {
.copy_style = { [INIT_FEATURE] = FEATURE_REPRESENT, .copy_style = { [INIT_FEATURE] = FEATURE_REPRESENT,
[NODE_ANNOUNCE_FEATURE] = FEATURE_REPRESENT, [NODE_ANNOUNCE_FEATURE] = FEATURE_REPRESENT,
[CHANNEL_FEATURE] = FEATURE_DONT_REPRESENT } }, [CHANNEL_FEATURE] = FEATURE_DONT_REPRESENT } },
{ OPT_QUIESCE,
.copy_style = { [INIT_FEATURE] = FEATURE_REPRESENT,
[NODE_ANNOUNCE_FEATURE] = FEATURE_REPRESENT,
[CHANNEL_FEATURE] = FEATURE_DONT_REPRESENT } },
}; };
struct dependency { struct dependency {
@@ -393,7 +397,7 @@ const char *feature_name(const tal_t *ctx, size_t f)
"option_dual_fund", "option_dual_fund",
"option_amp", /* 30/31 */ /* https://github.com/lightningnetwork/lightning-rfc/pull/658 */ "option_amp", /* 30/31 */ /* https://github.com/lightningnetwork/lightning-rfc/pull/658 */
NULL, NULL,
"option_upgrade_channel", /* https://github.com/lightningnetwork/lightning-rfc/pull/868 */ "option_quiesce", /* https://github.com/lightningnetwork/lightning-rfc/pull/869 */
NULL, NULL,
"option_onion_messages", /* https://github.com/lightningnetwork/lightning-rfc/pull/759 */ "option_onion_messages", /* https://github.com/lightningnetwork/lightning-rfc/pull/759 */
"option_want_peer_backup", /* 40/41 */ /* https://github.com/lightningnetwork/lightning-rfc/pull/881 */ "option_want_peer_backup", /* 40/41 */ /* https://github.com/lightningnetwork/lightning-rfc/pull/881 */

View File

@@ -130,6 +130,11 @@ const char *fmt_featurebits(const tal_t *ctx, const u8 *featurebits);
*/ */
#define OPT_DUAL_FUND 28 #define OPT_DUAL_FUND 28
/* BOLT-quiescent #9:
* | 34/35 | `option_quiesce` | ... IN ...
*/
#define OPT_QUIESCE 34
/* BOLT-1ede04a1a3225581e265b3ce96984ba88253a4a4 #9: /* BOLT-1ede04a1a3225581e265b3ce96984ba88253a4a4 #9:
* *
* | 38/39 | `option_onion_messages` |... INC+ ... * | 38/39 | `option_onion_messages` |... INC+ ...

View File

@@ -806,6 +806,7 @@ static struct feature_set *default_features(const tal_t *ctx)
OPTIONAL_FEATURE(OPT_SHUTDOWN_ANYSEGWIT), OPTIONAL_FEATURE(OPT_SHUTDOWN_ANYSEGWIT),
#if EXPERIMENTAL_FEATURES #if EXPERIMENTAL_FEATURES
OPTIONAL_FEATURE(OPT_ANCHOR_OUTPUTS), OPTIONAL_FEATURE(OPT_ANCHOR_OUTPUTS),
OPTIONAL_FEATURE(OPT_QUIESCE),
OPTIONAL_FEATURE(OPT_ONION_MESSAGES), OPTIONAL_FEATURE(OPT_ONION_MESSAGES),
#endif #endif
}; };

View File

@@ -1923,6 +1923,7 @@ def test_list_features_only(node_factory):
if EXPERIMENTAL_FEATURES: if EXPERIMENTAL_FEATURES:
expected += ['option_anchor_outputs/odd'] expected += ['option_anchor_outputs/odd']
expected += ['option_shutdown_anysegwit/odd'] expected += ['option_shutdown_anysegwit/odd']
expected += ['option_quiesce/odd']
expected += ['option_onion_messages/odd'] expected += ['option_onion_messages/odd']
expected += ['supports_open_accept_channel_type'] expected += ['supports_open_accept_channel_type']
else: else:

View File

@@ -26,6 +26,8 @@ def expected_peer_features(wumbo_channels=False, extra=[]):
features += [39] features += [39]
# option_anchor_outputs # option_anchor_outputs
features += [21] features += [21]
# option_quiesce
features += [35]
if wumbo_channels: if wumbo_channels:
features += [19] features += [19]
if EXPERIMENTAL_DUAL_FUND: if EXPERIMENTAL_DUAL_FUND:
@@ -46,6 +48,8 @@ def expected_node_features(wumbo_channels=False, extra=[]):
features += [39] features += [39]
# option_anchor_outputs # option_anchor_outputs
features += [21] features += [21]
# option_quiesce
features += [35]
if wumbo_channels: if wumbo_channels:
features += [19] features += [19]
if EXPERIMENTAL_DUAL_FUND: if EXPERIMENTAL_DUAL_FUND: