Skip to content

Commit

Permalink
devtools: allow encode with 9 flag (for features).
Browse files Browse the repository at this point in the history
Signed-off-by: Rusty Russell <[email protected]>
  • Loading branch information
rustyrussell committed Feb 14, 2025
1 parent 91d7394 commit 6d961f6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions devtools/bolt11-cli.c
Original file line number Diff line number Diff line change
Expand Up @@ -142,9 +142,10 @@ static void encode(const tal_t *ctx,
b11->timestamp = strtoul(val, &endp, 10);
if (!b11->timestamp || *endp != '\0')
errx(ERROR_USAGE, "Invalid amount %s", val);
/* Allow raw numbered fields */
/* Allow raw numbered fields (except 9, that's below) */
} else if ((fieldnum = strtoul(fname, &endp, 10)) != 0
&& fieldnum < 256) {
&& fieldnum < 256
&& fieldnum != 9) {
struct bolt11_field *extra = tal(b11, struct bolt11_field);
extra->tag = fieldnum;
extra->data = tal_hexdata(extra, val, strlen(val));
Expand Down

0 comments on commit 6d961f6

Please sign in to comment.