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

Function dualopen_shutdown

openingd/dualopend.c:315–331  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

313}
314
315static void dualopen_shutdown(struct state *state)
316{
317 u8 *msg = towire_dualopend_shutdown_complete(state);
318
319 wire_sync_write(REQ_FD, msg);
320 per_peer_state_fdpass_send(REQ_FD, state->pps);
321 status_debug("Sent %s with fds",
322 dualopend_wire_name(fromwire_peektype(msg)));
323
324 /* Give master a chance to pass the fd along */
325 sleep(1);
326
327 /* This frees the entire tal tree. */
328 tal_free(state);
329 daemon_shutdown();
330 exit(0);
331}
332
333static bool shutdown_complete(const struct state *state)
334{

Callers 1

opening_negotiate_msgFunction · 0.85

Calls 5

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

Tested by

no test coverage detected