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

Function new_subd

connectd/multiplex.c:1055–1073  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1053}
1054
1055static struct subd *new_subd(struct peer *peer,
1056 const struct channel_id *channel_id)
1057{
1058 struct subd *subd;
1059
1060 subd = tal(peer, struct subd);
1061 subd->peer = peer;
1062 subd->outq = msg_queue_new(subd, false);
1063 subd->channel_id = *channel_id;
1064 subd->temporary_channel_id = NULL;
1065 subd->opener_revocation_basepoint = NULL;
1066 subd->conn = NULL;
1067
1068 /* Connect it to the peer */
1069 tal_arr_expand(&peer->subds, subd);
1070 tal_add_destructor(subd, destroy_subd);
1071
1072 return subd;
1073}
1074
1075static struct io_plan *read_hdr_from_peer(struct io_conn *peer_conn,
1076 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