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

Function tlvstream_set_tlv_payload_data

plugins/libplugin-pay.c:1614–1623  ·  view source on GitHub ↗

Temporary serialization method for the tlv_payload.data until we rework the * API that is generated from the specs to use the setter/getter interface. */

Source from the content-addressed store, hash-verified

1612/* Temporary serialization method for the tlv_payload.data until we rework the
1613 * API that is generated from the specs to use the setter/getter interface. */
1614static void tlvstream_set_tlv_payload_data(struct tlv_field **stream,
1615 const struct secret *payment_secret,
1616 u64 total_msat)
1617{
1618 u8 *ser = tal_arr(NULL, u8, 0);
1619 towire_secret(&ser, payment_secret);
1620 towire_tu64(&ser, total_msat);
1621 tlvstream_set_raw(stream, TLV_TLV_PAYLOAD_PAYMENT_DATA, ser, tal_bytelen(ser));
1622 tal_free(ser);
1623}
1624
1625static void payment_add_hop_onion_payload(struct payment *p,
1626 struct createonion_hop *dst,

Callers 3

presplit_cbFunction · 0.85
adaptive_splitter_cbFunction · 0.85

Calls 5

towire_secretFunction · 0.85
tlvstream_set_rawFunction · 0.85
tal_bytelenFunction · 0.85
tal_freeFunction · 0.85
towire_tu64Function · 0.50

Tested by

no test coverage detected