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

Function unknown_field

common/bolt11.c:128–142  ·  view source on GitHub ↗

* These handle specific fields in the payment request; returning the problem * if any, or NULL. */

Source from the content-addressed store, hash-verified

126 * if any, or NULL.
127 */
128static char *unknown_field(struct bolt11 *b11,
129 struct hash_u5 *hu5,
130 u5 **data, size_t *data_len,
131 u5 type, size_t length)
132{
133 struct bolt11_field *extra = tal(b11, struct bolt11_field);
134 u8 u8data[num_u8(length)];
135
136 extra->tag = type;
137 extra->data = tal_dup_arr(extra, u5, *data, length, 0);
138 list_add_tail(&b11->extra_fields, &extra->list);
139
140 pull_bits_certain(hu5, data, data_len, u8data, length * 5, true);
141 return NULL;
142}
143
144/* BOLT #11:
145 *

Callers 10

decode_pFunction · 0.85
decode_dFunction · 0.85
decode_hFunction · 0.85
decode_xFunction · 0.85
decode_cFunction · 0.85
decode_nFunction · 0.85
decode_sFunction · 0.85
decode_fFunction · 0.85
decode_mFunction · 0.85
bolt11_decode_nosigFunction · 0.85

Calls 1

num_u8Function · 0.85

Tested by

no test coverage detected