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

Function handle_channel_closed

lightningd/dual_open_control.c:1607–1631  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1605}
1606
1607static void handle_channel_closed(struct subd *dualopend,
1608 const int *fds,
1609 const u8 *msg)
1610{
1611 struct peer_fd *peer_fd;
1612 struct channel *channel = dualopend->channel;
1613
1614 if (!fromwire_dualopend_shutdown_complete(msg)) {
1615 channel_internal_error(dualopend->channel,
1616 "Bad DUALOPEND_SHUTDOWN_COMPLETE: %s",
1617 tal_hex(msg, msg));
1618 close(fds[0]);
1619 close(fds[1]);
1620 return;
1621 }
1622
1623 peer_fd = new_peer_fd_arr(tmpctx, fds);
1624
1625 peer_start_closingd(channel, peer_fd);
1626 channel_set_state(channel,
1627 CHANNELD_SHUTTING_DOWN,
1628 CLOSINGD_SIGEXCHANGE,
1629 REASON_UNKNOWN,
1630 "Start closingd");
1631}
1632
1633struct channel_send {
1634 const struct wally_tx *wtx;

Callers 1

dual_opend_msgFunction · 0.85

Calls 5

tal_hexFunction · 0.85
peer_start_closingdFunction · 0.85
channel_set_stateFunction · 0.85
channel_internal_errorFunction · 0.70
new_peer_fd_arrFunction · 0.70

Tested by

no test coverage detected