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

Function sync_crypto_write

devtools/gossipwith.c:135–144  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

133}
134
135static 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
146static u8 *sync_crypto_read(const tal_t *ctx, int peer_fd, struct crypto_state *cs)
147{

Callers 1

handshake_successFunction · 0.85

Calls 3

cryptomsg_encrypt_msgFunction · 0.85
tal_freeFunction · 0.85
write_allFunction · 0.50

Tested by

no test coverage detected