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

Function towire_added_htlc

common/htlc_wire.c:74–89  ·  view source on GitHub ↗

FIXME: We could adapt tools/generate-wire.py to generate structures * and code like this. */

Source from the content-addressed store, hash-verified

72/* FIXME: We could adapt tools/generate-wire.py to generate structures
73 * and code like this. */
74void towire_added_htlc(u8 **pptr, const struct added_htlc *added)
75{
76 towire_u64(pptr, added->id);
77 towire_amount_msat(pptr, added->amount);
78 towire_sha256(pptr, &added->payment_hash);
79 towire_u32(pptr, added->cltv_expiry);
80 towire(pptr, added->onion_routing_packet,
81 sizeof(added->onion_routing_packet));
82 if (added->blinding) {
83 towire_bool(pptr, true);
84 towire_pubkey(pptr, added->blinding);
85 towire_secret(pptr, &added->blinding_ss);
86 } else
87 towire_bool(pptr, false);
88 towire_bool(pptr, added->fail_immediate);
89}
90
91void towire_existing_htlc(u8 **pptr, const struct existing_htlc *existing)
92{

Callers

nothing calls this directly

Calls 8

towire_pubkeyFunction · 0.85
towire_secretFunction · 0.85
towire_amount_msatFunction · 0.70
towire_u64Function · 0.50
towire_sha256Function · 0.50
towire_u32Function · 0.50
towireFunction · 0.50
towire_boolFunction · 0.50

Tested by

no test coverage detected