| 3089 | } |
| 3090 | |
| 3091 | void peer_dev_memleak(struct lightningd *ld, struct leak_detect *leaks) |
| 3092 | { |
| 3093 | struct peer *p; |
| 3094 | |
| 3095 | list_for_each(&ld->peers, p, list) { |
| 3096 | struct channel *c; |
| 3097 | if (p->uncommitted_channel && p->uncommitted_channel->open_daemon) { |
| 3098 | struct subd *openingd = p->uncommitted_channel->open_daemon; |
| 3099 | start_leak_request(subd_req(openingd, openingd, |
| 3100 | take(towire_openingd_dev_memleak(NULL)), |
| 3101 | -1, 0, openingd_memleak_req_done, leaks), |
| 3102 | leaks); |
| 3103 | } |
| 3104 | |
| 3105 | list_for_each(&p->channels, c, list) { |
| 3106 | if (!c->owner) |
| 3107 | continue; |
| 3108 | if (streq(c->owner->name, "channeld")) { |
| 3109 | start_leak_request(subd_req(c, c->owner, |
| 3110 | take(towire_channeld_dev_memleak(NULL)), |
| 3111 | -1, 0, channeld_memleak_req_done, leaks), |
| 3112 | leaks); |
| 3113 | } else if (streq(c->owner->name, "onchaind")) { |
| 3114 | start_leak_request(subd_req(c, c->owner, |
| 3115 | take(towire_onchaind_dev_memleak(NULL)), |
| 3116 | -1, 0, onchaind_memleak_req_done, leaks), |
| 3117 | leaks); |
| 3118 | } else if (streq(c->owner->name, "dualopend")) { |
| 3119 | start_leak_request(subd_req(c, c->owner, |
| 3120 | take(towire_dualopend_dev_memleak(NULL)), |
| 3121 | -1, 0, dualopend_memleak_req_done, leaks), |
| 3122 | leaks); |
| 3123 | } |
| 3124 | } |
| 3125 | } |
| 3126 | } |
| 3127 | #endif /* DEVELOPER */ |
no test coverage detected