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. */
| 420 | * `channel_update` without its `signature` and `timestamp` fields. |
| 421 | */ |
| 422 | static u32 crc32_of_update(const u8 *channel_update) |
| 423 | { |
| 424 | u32 sum; |
| 425 | const u8 *parts[2]; |
| 426 | size_t sizes[ARRAY_SIZE(parts)]; |
| 427 | |
| 428 | get_cupdate_parts(channel_update, parts, sizes); |
| 429 | |
| 430 | sum = 0; |
| 431 | for (size_t i = 0; i < ARRAY_SIZE(parts); i++) |
| 432 | sum = crc32c(sum, parts[i], sizes[i]); |
| 433 | return sum; |
| 434 | } |
| 435 | |
| 436 | /* BOLT #7: |
| 437 | * Where: |