| 9 | #include <lightningd/subd.h> |
| 10 | |
| 11 | static void destroy_uncommitted_channel(struct uncommitted_channel *uc) |
| 12 | { |
| 13 | struct subd *open_daemon = uc->open_daemon; |
| 14 | |
| 15 | if (open_daemon) { |
| 16 | uc->open_daemon = NULL; |
| 17 | subd_release_channel(open_daemon, uc); |
| 18 | } |
| 19 | |
| 20 | /* This is how shutdown_subdaemons tells us not to delete from db! */ |
| 21 | if (!uc->peer->uncommitted_channel) |
| 22 | return; |
| 23 | |
| 24 | uc->peer->uncommitted_channel = NULL; |
| 25 | |
| 26 | maybe_delete_peer(uc->peer); |
| 27 | } |
| 28 | |
| 29 | struct uncommitted_channel * |
| 30 | new_uncommitted_channel(struct peer *peer) |
nothing calls this directly
no test coverage detected