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. */
| 456 | * `channel_update` without its `signature` and `timestamp` fields. |
| 457 | */ |
| 458 | static u32 crc32_of_update(const u8 *channel_update) |
| 459 | { |
| 460 | u32 sum; |
| 461 | const u8 *parts[2]; |
| 462 | size_t sizes[ARRAY_SIZE(parts)]; |
| 463 | |
| 464 | get_cupdate_parts(channel_update, parts, sizes); |
| 465 | |
| 466 | sum = 0; |
| 467 | for (size_t i = 0; i < ARRAY_SIZE(parts); i++) |
| 468 | sum = crc32c(sum, parts[i], sizes[i]); |
| 469 | return sum; |
| 470 | } |
| 471 | |
| 472 | /* BOLT #7: |
| 473 | * Where: |