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

Function ofees_hash_destroy

plugins/bkpr/onchain_fee.c:692–705  ·  view source on GitHub ↗

If we're freeing the entire hash table, remove destructors from * individual entries! */

Source from the content-addressed store, hash-verified

690/* If we're freeing the entire hash table, remove destructors from
691 * individual entries! */
692static void ofees_hash_destroy(struct ofees_hash *ofees_hash)
693{
694 struct ofees_hash_iter it;
695 struct ordered_ofees *ofees;
696
697 for (ofees = ofees_hash_first(ofees_hash, &it);
698 ofees;
699 ofees = ofees_hash_next(ofees_hash, &it)) {
700 for (size_t i = 0; i < tal_count(ofees->ofs); i++) {
701 tal_del_destructor2(ofees->ofs[i],
702 destroy_onchain_fee, ofees_hash);
703 }
704 }
705}
706
707static void memleak_scan_ofees_hash(struct htable *memtable,
708 struct ofees_hash *ht)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected