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

Function towire_shachain

common/htlc_wire.c:162–173  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

160}
161
162void towire_shachain(u8 **pptr, const struct shachain *shachain)
163{
164 size_t i;
165
166 towire_u64(pptr, shachain->min_index);
167 towire_u32(pptr, shachain->num_valid);
168
169 for (i = 0; i < shachain->num_valid; i++) {
170 towire_u64(pptr, shachain->known[i].index);
171 towire_sha256(pptr, &shachain->known[i].hash);
172 }
173}
174
175void fromwire_added_htlc(const u8 **cursor, size_t *max,
176 struct added_htlc *added)

Callers

nothing calls this directly

Calls 3

towire_u64Function · 0.50
towire_u32Function · 0.50
towire_sha256Function · 0.50

Tested by

no test coverage detected