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

Function towire_failed_htlc

common/htlc_wire.c:131–144  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

129}
130
131void towire_failed_htlc(u8 **pptr, const struct failed_htlc *failed)
132{
133 towire_u64(pptr, failed->id);
134 /* Only one can be set. */
135 if (failed->sha256_of_onion) {
136 assert(!failed->onion);
137 assert(failed->badonion & BADONION);
138 towire_u16(pptr, failed->badonion);
139 towire_sha256(pptr, failed->sha256_of_onion);
140 } else {
141 towire_u16(pptr, 0);
142 towire_onionreply(pptr, failed->onion);
143 }
144}
145
146static void towire_htlc_state(u8 **pptr, const enum htlc_state hstate)
147{

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