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

Function json_add_utf8

plugins/offers.c:859–870  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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