| 126 | #endif |
| 127 | |
| 128 | static void write_to_store(int store_fd, const u8 *msg) |
| 129 | { |
| 130 | struct gossip_hdr hdr; |
| 131 | |
| 132 | hdr.flags = cpu_to_be16(GOSSIP_STORE_COMPLETED_BIT); |
| 133 | hdr.len = cpu_to_be16(tal_count(msg)); |
| 134 | hdr.timestamp = 0; |
| 135 | hdr.crc = cpu_to_be32(crc32c(be32_to_cpu(hdr.timestamp), msg, tal_count(msg))); |
| 136 | assert(write(store_fd, &hdr, sizeof(hdr)) == sizeof(hdr)); |
| 137 | assert(write(store_fd, msg, tal_count(msg)) == tal_count(msg)); |
| 138 | } |
| 139 | |
| 140 | static void update_connection(int store_fd, |
| 141 | const struct node_id *from, |
no test coverage detected