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

Function want_update

gossipd/seeker.c:583–593  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

581
582/* They have update with this timestamp: do we want it? */
583static bool want_update(struct seeker *seeker,
584 u32 timestamp, const struct half_chan *hc)
585{
586 if (!is_halfchan_defined(hc))
587 return timestamp != 0;
588
589 if (timestamp <= hc->bcast.timestamp)
590 return false;
591
592 return !would_ratelimit_cupdate(seeker->daemon->rstate, hc, timestamp);
593}
594
595/* They gave us timestamps. Do we want updated versions? */
596static void check_timestamps(struct seeker *seeker,

Callers 1

check_timestampsFunction · 0.85

Calls 2

is_halfchan_definedFunction · 0.85
would_ratelimit_cupdateFunction · 0.70

Tested by

no test coverage detected