| 133 | } |
| 134 | |
| 135 | static void sync_crypto_write(int peer_fd, struct crypto_state *cs, const void *msg TAKES) |
| 136 | { |
| 137 | u8 *enc; |
| 138 | |
| 139 | enc = cryptomsg_encrypt_msg(NULL, cs, msg); |
| 140 | |
| 141 | if (!write_all(peer_fd, enc, tal_count(enc))) |
| 142 | exit(1); |
| 143 | tal_free(enc); |
| 144 | } |
| 145 | |
| 146 | static u8 *sync_crypto_read(const tal_t *ctx, int peer_fd, struct crypto_state *cs) |
| 147 | { |
no test coverage detected