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

Function handle_channel_closed

lightningd/dual_open_control.c:1387–1411  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1385}
1386
1387static void handle_channel_closed(struct subd *dualopend,
1388 const int *fds,
1389 const u8 *msg)
1390{
1391 struct peer_fd *peer_fd;
1392 struct channel *channel = dualopend->channel;
1393
1394 if (!fromwire_dualopend_shutdown_complete(msg)) {
1395 channel_internal_error(dualopend->channel,
1396 "Bad DUALOPEND_SHUTDOWN_COMPLETE: %s",
1397 tal_hex(msg, msg));
1398 close(fds[0]);
1399 close(fds[1]);
1400 return;
1401 }
1402
1403 peer_fd = new_peer_fd_arr(tmpctx, fds);
1404
1405 peer_start_closingd(channel, peer_fd);
1406 channel_set_state(channel,
1407 CHANNELD_SHUTTING_DOWN,
1408 CLOSINGD_SIGEXCHANGE,
1409 REASON_UNKNOWN,
1410 "Start closingd");
1411}
1412
1413static void handle_local_private_channel(struct subd *dualopend,
1414 const u8 *msg)

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