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

Function towire_failed_htlc

common/htlc_wire.c:153–166  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

151}
152
153void towire_failed_htlc(u8 **pptr, const struct failed_htlc *failed)
154{
155 towire_u64(pptr, failed->id);
156 /* Only one can be set. */
157 if (failed->sha256_of_onion) {
158 assert(!failed->onion);
159 assert(failed->badonion & BADONION);
160 towire_u16(pptr, failed->badonion);
161 towire_sha256(pptr, failed->sha256_of_onion);
162 } else {
163 towire_u16(pptr, 0);
164 towire_onionreply(pptr, failed->onion);
165 }
166}
167
168static void towire_htlc_state(u8 **pptr, const enum htlc_state hstate)
169{

Callers 1

towire_existing_htlcFunction · 0.85

Calls 4

towire_onionreplyFunction · 0.85
towire_u64Function · 0.50
towire_u16Function · 0.50
towire_sha256Function · 0.50

Tested by

no test coverage detected