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

Function new_subd

connectd/multiplex.c:1386–1403  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1384}
1385
1386static struct subd *new_subd(struct peer *peer,
1387 const struct channel_id *channel_id)
1388{
1389 struct subd *subd;
1390
1391 subd = tal(peer, struct subd);
1392 subd->peer = peer;
1393 subd->outq = msg_queue_new(subd, false);
1394 subd->channel_id = *channel_id;
1395 subd->temporary_channel_id = NULL;
1396 subd->opener_revocation_basepoint = NULL;
1397 subd->conn = NULL;
1398 subd->rcvd_tx_abort = false;
1399
1400 /* Connect it to the peer */
1401 tal_arr_expand(&peer->subds, subd);
1402 return subd;
1403}
1404
1405static struct io_plan *close_peer_dev_disconnect(struct io_conn *peer_conn,
1406 struct peer *peer)

Callers 2

read_body_from_peer_doneFunction · 0.70
peer_connect_subdFunction · 0.70

Calls 1

msg_queue_newFunction · 0.85

Tested by

no test coverage detected