From 5ef49143e053223af6583d627bb80c524429f9cd Mon Sep 17 00:00:00 2001 From: adi2011 Date: Thu, 2 Feb 2023 20:31:24 +1030 Subject: [PATCH] feature(PEER_STORAGE and YOUR_PEER_STORAGE) added in feature.c and internal message. --- common/features.c | 10 ++++++++-- common/features.h | 3 ++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/common/features.c b/common/features.c index de3e98fd6..d6f443452 100644 --- a/common/features.c +++ b/common/features.c @@ -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", diff --git a/common/features.h b/common/features.h index a862bafe1..efb3567f5 100644 --- a/common/features.h +++ b/common/features.h @@ -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 */