| 39 | } |
| 40 | |
| 41 | static void writerec(int fd, const void *msg) |
| 42 | { |
| 43 | struct gossip_hdr ghdr; |
| 44 | |
| 45 | ghdr.flags = cpu_to_be16(GOSSIP_STORE_COMPLETED_BIT); |
| 46 | ghdr.len = cpu_to_be16(tal_bytelen(msg)); |
| 47 | ghdr.timestamp = 0; |
| 48 | ghdr.crc = cpu_to_be32(crc32c(be32_to_cpu(ghdr.timestamp), |
| 49 | msg, tal_bytelen(msg))); |
| 50 | writex(fd, &ghdr, sizeof(ghdr)); |
| 51 | writex(fd, msg, tal_bytelen(msg)); |
| 52 | } |
| 53 | |
| 54 | static u64 copy_records(int oldfd, int newfd, u64 old_off, u64 limit, |
| 55 | bool keep_delete_chan) |
no test coverage detected