Skip to content

Commit e0bad48

Browse files
committed
features: define option_anchor_outputs.
As specified by lightning/bolts#688. Signed-off-by: Rusty Russell <[email protected]>
1 parent 6da3d71 commit e0bad48

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

common/features.c

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,10 @@ static const struct feature_style feature_styles[] = {
6969
[NODE_ANNOUNCE_FEATURE] = FEATURE_REPRESENT,
7070
[CHANNEL_FEATURE] = FEATURE_DONT_REPRESENT } },
7171
#if EXPERIMENTAL_FEATURES
72+
{ OPT_ANCHOR_OUTPUTS,
73+
.copy_style = { [INIT_FEATURE] = FEATURE_REPRESENT,
74+
[NODE_ANNOUNCE_FEATURE] = FEATURE_REPRESENT,
75+
[CHANNEL_FEATURE] = FEATURE_DONT_REPRESENT } },
7276
{ OPT_ONION_MESSAGES,
7377
.copy_style = { [INIT_FEATURE] = FEATURE_REPRESENT,
7478
[NODE_ANNOUNCE_FEATURE] = FEATURE_REPRESENT,
@@ -95,6 +99,14 @@ static const struct dependency feature_deps[] = {
9599
{ OPT_GOSSIP_QUERIES_EX, OPT_GOSSIP_QUERIES },
96100
{ OPT_PAYMENT_SECRET, OPT_VAR_ONION },
97101
{ OPT_BASIC_MPP, OPT_PAYMENT_SECRET },
102+
/* BOLT-a12da24dd0102c170365124782b46d9710950ac1 #9:
103+
* Name | Description | Context | Dependencies |
104+
*...
105+
* `option_anchor_outputs` | ... | ... | `option_static_remotekey`
106+
*/
107+
#if EXPERIMENTAL_FEATURES
108+
{ OPT_ANCHOR_OUTPUTS, OPT_STATIC_REMOTEKEY },
109+
#endif
98110
};
99111

100112
static enum feature_copy_style feature_copy_style(u32 f, enum feature_place p)
@@ -315,6 +327,8 @@ static const char *feature_name(const tal_t *ctx, size_t f)
315327
"option_static_remotekey",
316328
"option_payment_secret",
317329
"option_basic_mpp",
330+
"option_support_large_channel",
331+
"option_anchor_outputs",
318332
};
319333

320334
if (f / 2 >= ARRAY_SIZE(fnames))

common/features.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,12 @@ u8 *featurebits_or(const tal_t *ctx, const u8 *f1 TAKES, const u8 *f2 TAKES);
107107
#define OPT_BASIC_MPP 16
108108
#define OPT_LARGE_CHANNELS 18
109109

110+
/* BOLT-a12da24dd0102c170365124782b46d9710950ac1 #9:
111+
*
112+
* | 20/21 | `option_anchor_outputs` |... IN ...
113+
*/
114+
#define OPT_ANCHOR_OUTPUTS 20
115+
110116
/* BOLT-9fc25cfd2895578c0b1ab701ebe6c1eb67a19623 #9:
111117
*
112118
* | 102/103 | `option_onion_messages` |... INC+ ...

0 commit comments

Comments
 (0)