| 121 | } |
| 122 | |
| 123 | static void sync_crypto_write(int peer_fd, struct crypto_state *cs, const void *msg TAKES) |
| 124 | { |
| 125 | u8 *enc; |
| 126 | |
| 127 | enc = cryptomsg_encrypt_msg(NULL, cs, msg); |
| 128 | |
| 129 | if (!write_all(peer_fd, enc, tal_count(enc))) |
| 130 | exit(1); |
| 131 | tal_free(enc); |
| 132 | } |
| 133 | |
| 134 | static u8 *sync_crypto_read(const tal_t *ctx, int peer_fd, struct crypto_state *cs) |
| 135 | { |
no test coverage detected