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

Function handle_dev_memleak

onchaind/onchaind.c:2096–2116  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2094}
2095
2096static bool handle_dev_memleak(struct tracked_output **outs, const u8 *msg)
2097{
2098 struct htable *memtable;
2099 bool found_leak;
2100
2101 if (!fromwire_onchaind_dev_memleak(msg))
2102 return false;
2103
2104 memtable = memleak_start(tmpctx);
2105 memleak_ptr(memtable, msg);
2106
2107 /* Top-level context is parent of outs */
2108 memleak_remove_globals(memtable, tal_parent(outs));
2109 memleak_scan_obj(memtable, outs);
2110
2111 found_leak = dump_memleak(memtable, memleak_status_broken);
2112 wire_sync_write(REQ_FD,
2113 take(towire_onchaind_dev_memleak_reply(NULL,
2114 found_leak)));
2115 return true;
2116}
2117#else
2118static bool handle_dev_memleak(struct tracked_output **outs, const u8 *msg)
2119{

Callers 1

wait_for_resolvedFunction · 0.70

Calls 9

memleak_remove_globalsFunction · 0.85
tal_parentFunction · 0.85
memleak_startFunction · 0.50
memleak_ptrFunction · 0.50
memleak_scan_objFunction · 0.50
dump_memleakFunction · 0.50
wire_sync_writeFunction · 0.50

Tested by

no test coverage detected