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

Function fromwire_added_htlc

common/htlc_wire.c:175–191  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

173}
174
175void fromwire_added_htlc(const u8 **cursor, size_t *max,
176 struct added_htlc *added)
177{
178 added->id = fromwire_u64(cursor, max);
179 added->amount = fromwire_amount_msat(cursor, max);
180 fromwire_sha256(cursor, max, &added->payment_hash);
181 added->cltv_expiry = fromwire_u32(cursor, max);
182 fromwire(cursor, max, added->onion_routing_packet,
183 sizeof(added->onion_routing_packet));
184 if (fromwire_bool(cursor, max)) {
185 added->blinding = tal(added, struct pubkey);
186 fromwire_pubkey(cursor, max, added->blinding);
187 fromwire_secret(cursor, max, &added->blinding_ss);
188 } else
189 added->blinding = NULL;
190 added->fail_immediate = fromwire_bool(cursor, max);
191}
192
193struct existing_htlc *fromwire_existing_htlc(const tal_t *ctx,
194 const u8 **cursor, size_t *max)

Callers

nothing calls this directly

Calls 8

fromwire_pubkeyFunction · 0.85
fromwire_secretFunction · 0.85
fromwire_amount_msatFunction · 0.70
fromwire_u64Function · 0.50
fromwire_sha256Function · 0.50
fromwire_u32Function · 0.50
fromwireFunction · 0.50
fromwire_boolFunction · 0.50

Tested by

no test coverage detected