| 1155 | } |
| 1156 | |
| 1157 | static struct io_plan *read_body_from_peer(struct io_conn *peer_conn, |
| 1158 | struct peer *peer) |
| 1159 | { |
| 1160 | u16 len; |
| 1161 | |
| 1162 | if (!cryptomsg_decrypt_header(&peer->cs, peer->peer_in, &len)) |
| 1163 | return io_close(peer_conn); |
| 1164 | |
| 1165 | tal_resize(&peer->peer_in, (u32)len + CRYPTOMSG_BODY_OVERHEAD); |
| 1166 | return io_read(peer_conn, peer->peer_in, tal_count(peer->peer_in), |
| 1167 | read_body_from_peer_done, peer); |
| 1168 | } |
| 1169 | |
| 1170 | static struct io_plan *read_hdr_from_peer(struct io_conn *peer_conn, |
| 1171 | struct peer *peer) |
nothing calls this directly
no test coverage detected