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

Function get_leaf_hash

common/bolt12_proof.c:265–276  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

263}
264
265static void get_leaf_hash(const struct sha256_ctx *lnnonce_ctx,
266 bigsize_t fieldtype,
267 struct sha256 *hash,
268 struct checker *checker)
269{
270 if (checker->leaf_hashes_n >= tal_count(checker->pptlv->proof_leaf_hashes)) {
271 checker->leaf_hashes_exhausted = true;
272 *hash = dummy_hash();
273 } else {
274 *hash = checker->pptlv->proof_leaf_hashes[checker->leaf_hashes_n++];
275 }
276}
277
278static void resolve_omitted(struct sha256 *hash, struct checker *checker)
279{

Callers

nothing calls this directly

Calls 1

dummy_hashFunction · 0.85

Tested by

no test coverage detected