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

Function new_subd

connectd/multiplex.c:1482–1499  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1480}
1481
1482static struct subd *new_subd(struct peer *peer,
1483 const struct channel_id *channel_id)
1484{
1485 struct subd *subd;
1486
1487 subd = tal(peer, struct subd);
1488 subd->peer = peer;
1489 subd->outq = msg_queue_new(subd, false);
1490 subd->channel_id = *channel_id;
1491 subd->temporary_channel_id = NULL;
1492 subd->opener_revocation_basepoint = NULL;
1493 subd->conn = NULL;
1494 subd->rcvd_tx_abort = false;
1495
1496 /* Connect it to the peer */
1497 tal_arr_expand(&peer->subds, subd);
1498 return subd;
1499}
1500
1501static struct io_plan *close_peer_dev_disconnect(struct io_conn *peer_conn,
1502 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