BOLT #7: * * The checksum of a `channel_update` is the CRC32C checksum as specified in * [RFC3720](https://tools.ietf.org/html/rfc3720#appendix-B.4) of this * `channel_update` without its `signature` and `timestamp` fields. */
| 335 | * `channel_update` without its `signature` and `timestamp` fields. |
| 336 | */ |
| 337 | static u32 crc32_of_update(const u8 *channel_update) |
| 338 | { |
| 339 | u32 sum; |
| 340 | const u8 *parts[2]; |
| 341 | size_t sizes[ARRAY_SIZE(parts)]; |
| 342 | |
| 343 | get_cupdate_parts(channel_update, parts, sizes); |
| 344 | |
| 345 | sum = 0; |
| 346 | for (size_t i = 0; i < ARRAY_SIZE(parts); i++) |
| 347 | sum = crc32c(sum, parts[i], sizes[i]); |
| 348 | return sum; |
| 349 | } |
| 350 | |
| 351 | static void get_checksum_and_timestamp(struct routing_state *rstate, |
| 352 | const struct chan *chan, |