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

Function dualopen_shutdown

openingd/dualopend.c:297–313  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

295}
296
297static void dualopen_shutdown(struct state *state)
298{
299 u8 *msg = towire_dualopend_shutdown_complete(state);
300
301 wire_sync_write(REQ_FD, msg);
302 per_peer_state_fdpass_send(REQ_FD, state->pps);
303 status_debug("Sent %s with fds",
304 dualopend_wire_name(fromwire_peektype(msg)));
305
306 /* Give master a chance to pass the fd along */
307 sleep(1);
308
309 /* This frees the entire tal tree. */
310 tal_free(state);
311 daemon_shutdown();
312 exit(0);
313}
314
315static bool shutdown_complete(const struct state *state)
316{

Callers 1

opening_negotiate_msgFunction · 0.85

Calls 5

tal_freeFunction · 0.85
wire_sync_writeFunction · 0.50
fromwire_peektypeFunction · 0.50
daemon_shutdownFunction · 0.50

Tested by

no test coverage detected