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

Function handle_dev_memleak

onchaind/onchaind.c:1561–1580  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1559}
1560
1561static void handle_dev_memleak(struct tracked_output ***outs, const u8 *msg)
1562{
1563 struct htable *memtable;
1564 bool found_leak;
1565
1566 if (!fromwire_onchaind_dev_memleak(msg))
1567 master_badmsg(WIRE_ONCHAIND_DEV_MEMLEAK, msg);
1568
1569 memtable = memleak_start(tmpctx);
1570 memleak_ptr(memtable, msg);
1571
1572 /* Top-level context is parent of outs */
1573 memleak_remove_globals(memtable, tal_parent(*outs));
1574 memleak_scan_obj(memtable, *outs);
1575
1576 found_leak = dump_memleak(memtable, memleak_status_broken, NULL);
1577 wire_sync_write(REQ_FD,
1578 take(towire_onchaind_dev_memleak_reply(NULL,
1579 found_leak)));
1580}
1581
1582static void handle_onchaind_depth(struct tracked_output ***outs, const u8 *msg)
1583{

Callers 1

wait_for_resolvedFunction · 0.70

Calls 9

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

Tested by

no test coverage detected