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

Function towire_shachain

common/htlc_wire.c:184–195  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

182}
183
184void towire_shachain(u8 **pptr, const struct shachain *shachain)
185{
186 size_t i;
187
188 towire_u64(pptr, shachain->min_index);
189 towire_u32(pptr, shachain->num_valid);
190
191 for (i = 0; i < shachain->num_valid; i++) {
192 towire_u64(pptr, shachain->known[i].index);
193 towire_sha256(pptr, &shachain->known[i].hash);
194 }
195}
196
197static struct tlv_field *fromwire_len_and_tlvstream(const tal_t *ctx,
198 const u8 **cursor, size_t *max)

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