BOLT #7: * Where: * * `checksum_node_id_1` is the checksum of the `channel_update` for * `node_id_1`, or 0 if there was no `channel_update` from that * node. * * `checksum_node_id_2` is the checksum of the `channel_update` for * `node_id_2`, or 0 if there was no `channel_update` from that * node. */
| 497 | * node. |
| 498 | */ |
| 499 | static u32 get_checksum(struct gossmap *gossmap, |
| 500 | const struct gossmap_chan *chan, |
| 501 | int dir) |
| 502 | { |
| 503 | u8 *cupdate; |
| 504 | |
| 505 | cupdate = gossmap_chan_get_update(tmpctx, gossmap, chan, dir); |
| 506 | if (!cupdate) |
| 507 | return 0; |
| 508 | return crc32_of_update(cupdate); |
| 509 | } |
| 510 | |
| 511 | |
| 512 | /* FIXME: This assumes that the tlv type encodes into 1 byte! */ |
no test coverage detected