feature(PEER_STORAGE and YOUR_PEER_STORAGE) added in feature.c and internal message.

This commit is contained in:
adi2011 2023-02-02 20:31:24 +10:30 committed by Alex Myers
parent 5f481aaf96
commit 5ef49143e0
2 changed files with 10 additions and 3 deletions

View file

@ -136,6 +136,12 @@ static const struct feature_style feature_styles[] = {
[NODE_ANNOUNCE_FEATURE] = FEATURE_REPRESENT,
[BOLT11_FEATURE] = FEATURE_DONT_REPRESENT,
[CHANNEL_FEATURE] = FEATURE_DONT_REPRESENT } },
{ PEER_STORAGE_FEATURE,
.copy_style = { [INIT_FEATURE] = FEATURE_REPRESENT_AS_OPTIONAL,
[NODE_ANNOUNCE_FEATURE] = FEATURE_REPRESENT_AS_OPTIONAL } },
{ YOUR_PEER_STORAGE_FEATURE,
.copy_style = { [INIT_FEATURE] = FEATURE_REPRESENT_AS_OPTIONAL,
[NODE_ANNOUNCE_FEATURE] = FEATURE_REPRESENT_AS_OPTIONAL } },
};
struct dependency {
@ -450,8 +456,8 @@ const char *feature_name(const tal_t *ctx, size_t f)
"option_quiesce", /* https://github.com/lightning/bolts/pull/869 */
NULL,
"option_onion_messages", /* https://github.com/lightning/bolts/pull/759 */
"option_want_peer_backup", /* 40/41 */ /* https://github.com/lightning/bolts/pull/881 */
"option_provide_peer_backup", /* https://github.com/lightning/bolts/pull/881 */
"option_your_peer_storage", /* 40/41 */
"option_peer_storage",
"option_channel_type",
"option_scid_alias", /* https://github.com/lightning/bolts/pull/910 */
"option_payment_metadata",

View file

@ -15,7 +15,8 @@ enum feature_place {
BOLT12_INVOICE_FEATURE,
};
#define NUM_FEATURE_PLACE (BOLT12_INVOICE_FEATURE+1)
#define PEER_STORAGE_FEATURE 42
#define YOUR_PEER_STORAGE_FEATURE 40
extern const char *feature_place_names[NUM_FEATURE_PLACE];
/* The complete set of features for all contexts */