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

Function decode_m

common/bolt11.c:614–630  ·  view source on GitHub ↗

BOLT #11: * * `m` (27): `data_length` variable. Additional metadata to attach to * the payment. Note that the size of this field is limited by the * maximum hop payload size. Long metadata fields reduce the maximum * route length. */

Source from the content-addressed store, hash-verified

612 * route length.
613 */
614static const char *decode_m(struct bolt11 *b11,
615 const struct feature_set *our_features,
616 struct hash_u5 *hu5,
617 const u5 **data, size_t *field_len,
618 bool *have_m)
619{
620 const char *err;
621
622 assert(!*have_m);
623
624 b11->metadata = pull_all(b11, hu5, data, field_len, false, &err);
625 if (!b11->metadata)
626 return err;
627
628 *have_m = true;
629 return NULL;
630}
631
632struct bolt11 *new_bolt11(const tal_t *ctx,
633 const struct amount_msat *msat TAKES)

Callers

nothing calls this directly

Calls 1

pull_allFunction · 0.85

Tested by

no test coverage detected