Skip to content

Commit d5946e6

Browse files
committed
devtools: allow encode with 9 flag (for features).
Signed-off-by: Rusty Russell <[email protected]>
1 parent 4e7ba96 commit d5946e6

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

devtools/bolt11-cli.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,9 +142,10 @@ static void encode(const tal_t *ctx,
142142
b11->timestamp = strtoul(val, &endp, 10);
143143
if (!b11->timestamp || *endp != '\0')
144144
errx(ERROR_USAGE, "Invalid amount %s", val);
145-
/* Allow raw numbered fields */
145+
/* Allow raw numbered fields (except 9, that's below) */
146146
} else if ((fieldnum = strtoul(fname, &endp, 10)) != 0
147-
&& fieldnum < 256) {
147+
&& fieldnum < 256
148+
&& fieldnum != 9) {
148149
struct bolt11_field *extra = tal(b11, struct bolt11_field);
149150
extra->tag = fieldnum;
150151
extra->data = tal_hexdata(extra, val, strlen(val));

0 commit comments

Comments
 (0)