devtools: make bolt12-cli print blinded paths properly.

Print the first_node_id field, and do it all on one line per path.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2024-05-09 14:12:39 +09:30
parent e338452c19
commit 8027922cd4

View File

@@ -267,14 +267,13 @@ static bool print_blindedpaths(const char *fieldname,
for (size_t i = 0; i < tal_count(paths); i++) {
struct onionmsg_hop **p = paths[i]->path;
printf("%s %zu/%zu: blinding %s",
printf("%s %zu/%zu: blinding %s ",
fieldname,
i, tal_count(paths),
fmt_pubkey(tmpctx,
&paths[i]->blinding));
printf("%s %zu/%zu: path ",
fieldname,
i, tal_count(paths));
fmt_pubkey(tmpctx, &paths[i]->blinding));
printf("first_node_id %s ",
fmt_sciddir_or_pubkey(tmpctx, &paths[i]->first_node_id));
printf("path ");
for (size_t j = 0; j < tal_count(p); j++) {
printf(" %s:%s",
fmt_pubkey(tmpctx,