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

Function want_update

gossipd/seeker.c:635–651  ·  view source on GitHub ↗

They have update with this timestamp: do we want it? */

Source from the content-addressed store, hash-verified

633
634/* They have update with this timestamp: do we want it? */
635static bool want_update(struct gossmap *gossmap,
636 u32 timestamp,
637 const struct gossmap_chan *chan,
638 int dir)
639{
640 u32 our_timestamp;
641
642 if (!gossmap_chan_set(chan, dir))
643 return timestamp != 0;
644
645 gossmap_chan_get_update_details(gossmap, chan, dir, &our_timestamp,
646 NULL, NULL, NULL, NULL, NULL, NULL, NULL);
647 if (timestamp <= our_timestamp)
648 return false;
649
650 return true;
651}
652
653/* They gave us timestamps. Do we want updated versions? */
654static void check_timestamps(struct seeker *seeker,

Callers 1

check_timestampsFunction · 0.85

Calls 2

gossmap_chan_setFunction · 0.85

Tested by

no test coverage detected