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

Function tlv_name_to_num

plugins/offers_proof.c:83–90  ·  view source on GitHub ↗

Returns TLV type number for a field name, or UINT64_MAX if unknown. */

Source from the content-addressed store, hash-verified

81
82/* Returns TLV type number for a field name, or UINT64_MAX if unknown. */
83static bigsize_t tlv_name_to_num(const char *name)
84{
85 for (size_t i = 0; i < ARRAY_SIZE(field_names); i++) {
86 if (streq(field_names[i].name, name))
87 return field_names[i].num;
88 }
89 return UINT64_MAX;
90}
91
92/* Which "layer" does this TLV type belong to? */
93enum field_layer { LAYER_OFFER, LAYER_INVREQ, LAYER_INVOICE, LAYER_UNKNOWN };

Callers 1

param_include_typesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected