bolt11: undo json encoding for description bytes.

We don't handle \u, since we assume everyone sane is using UTF-8.  We'd
still have to reject '\u0000' and maybe other weird cases if we did.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2018-03-26 10:38:47 +10:30
parent 54431d2b08
commit 9f7d4312ff
4 changed files with 73 additions and 11 deletions

View File

@@ -105,7 +105,7 @@ int main(int argc, char *argv[])
if (b11->msatoshi)
printf("msatoshi: %"PRIu64"\n", *b11->msatoshi);
if (b11->description)
printf("description: %s\n", b11->description);
printf("description: '%s'\n", b11->description);
if (b11->description_hash)
printf("description_hash: %s\n",
tal_hexstr(ctx, b11->description_hash,