MCPcopy Create free account
hub / github.com/ElementsProject/lightning / print_extra_fields

Function print_extra_fields

devtools/bolt12-cli.c:458–477  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

456}
457
458static bool print_extra_fields(const struct tlv_field *fields)
459{
460 bool ok = true;
461
462 for (size_t i = 0; i < tal_count(fields); i++) {
463 if (fields[i].meta)
464 continue;
465 if (fields[i].numtype % 2 == 0) {
466 printf("UNKNOWN EVEN field %"PRIu64": %s\n",
467 fields[i].numtype,
468 tal_hexstr(tmpctx, fields[i].value, fields[i].length));
469 ok = false;
470 } else {
471 printf("Unknown field %"PRIu64": %s\n",
472 fields[i].numtype,
473 tal_hexstr(tmpctx, fields[i].value, fields[i].length));
474 }
475 }
476 return ok;
477}
478
479static u64 get_offer_type(const char *name)
480{

Callers 1

mainFunction · 0.85

Calls 1

tal_hexstrFunction · 0.85

Tested by

no test coverage detected