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

Function json_add_utf8

plugins/offers.c:857–868  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

855}
856
857static bool json_add_utf8(struct json_stream *js,
858 const char *fieldname,
859 const char *utf8str)
860{
861 if (utf8_check(utf8str, tal_bytelen(utf8str))) {
862 json_add_stringn(js, fieldname, utf8str, tal_bytelen(utf8str));
863 return true;
864 }
865 json_add_string(js, tal_fmt(tmpctx, "warning_invalid_%s", fieldname),
866 "invalid UTF8");
867 return false;
868}
869
870static void json_add_recurrence(struct json_stream *js,
871 const char *fieldname,

Callers 3

json_add_offer_fieldsFunction · 0.85
json_add_invreq_fieldsFunction · 0.85
json_add_payer_proofFunction · 0.85

Calls 4

tal_bytelenFunction · 0.85
json_add_stringnFunction · 0.85
utf8_checkFunction · 0.50
json_add_stringFunction · 0.50

Tested by

no test coverage detected