| 1053 | } |
| 1054 | |
| 1055 | static 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 | |
| 1075 | static struct io_plan *read_hdr_from_peer(struct io_conn *peer_conn, |
| 1076 | struct peer *peer); |
no test coverage detected