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

Function write_to_store

common/test/run-route-specific.c:50–60  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

48/* AUTOGENERATED MOCKS END */
49
50static void write_to_store(int store_fd, const u8 *msg)
51{
52 struct gossip_hdr hdr;
53
54 hdr.len = cpu_to_be32(tal_count(msg));
55 /* We don't actually check these! */
56 hdr.crc = 0;
57 hdr.timestamp = 0;
58 assert(write(store_fd, &hdr, sizeof(hdr)) == sizeof(hdr));
59 assert(write(store_fd, msg, tal_count(msg)) == tal_count(msg));
60}
61
62static void update_connection(int store_fd,
63 const struct node_id *from,

Callers 2

update_connectionFunction · 0.70
add_connectionFunction · 0.70

Calls 1

cpu_to_be32Function · 0.85

Tested by

no test coverage detected