MCPcopy Create free account
hub / github.com/ElementsProject/lightning / get_checksum

Function get_checksum

connectd/queries.c:463–473  ·  view source on GitHub ↗

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. */

Source from the content-addressed store, hash-verified

461 * node.
462 */
463static u32 get_checksum(struct gossmap *gossmap,
464 const struct gossmap_chan *chan,
465 int dir)
466{
467 u8 *cupdate;
468
469 cupdate = gossmap_chan_get_update(tmpctx, gossmap, chan, dir);
470 if (!cupdate)
471 return 0;
472 return crc32_of_update(cupdate);
473}
474
475/*~ We can send multiple replies when the peer queries for all channels in
476 * a given range of blocks; each one indicates the range of blocks it covers. */

Callers 1

make_reply_channel_rangeFunction · 0.85

Calls 2

gossmap_chan_get_updateFunction · 0.85
crc32_of_updateFunction · 0.70

Tested by

no test coverage detected