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

Function wire_sync_write

wire/wire_sync.c:8–20  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6#include <wire/wire_sync.h>
7
8bool wire_sync_write(int fd, const void *msg TAKES)
9{
10 wire_len_t hdr = cpu_to_wirelen(tal_bytelen(msg));
11 bool ret;
12
13 assert(tal_bytelen(msg) < WIRE_LEN_LIMIT);
14 ret = write_all(fd, &hdr, sizeof(hdr))
15 && write_all(fd, msg, tal_count(msg));
16
17 if (taken(msg))
18 tal_free(msg);
19 return ret;
20}
21
22u8 *wire_sync_read(const tal_t *ctx, int fd)
23{

Callers 12

get_channel_basepointsFunction · 0.50
new_unsaved_channelFunction · 0.50
json_signmessageFunction · 0.50
sign_last_txFunction · 0.50
new_uncommitted_channelFunction · 0.50
hsm_sign_b12Function · 0.50
json_memleakFunction · 0.50
hsm_get_fdFunction · 0.50
hsm_initFunction · 0.50
json_makesecretFunction · 0.50
hsm_sign_b11Function · 0.50
hsm_sign_b12_invoiceFunction · 0.50

Calls 4

tal_bytelenFunction · 0.85
takenFunction · 0.85
tal_freeFunction · 0.85
write_allFunction · 0.50

Tested by

no test coverage detected