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

Function first_for_level

ccan/ccan/timer/timer.c:205–218  ·  view source on GitHub ↗

Update level's first watermark, and return overall first. */

Source from the content-addressed store, hash-verified

203
204/* Update level's first watermark, and return overall first. */
205static const struct timer *first_for_level(struct timers *timers,
206 size_t level,
207 const struct timer *level_first,
208 const struct timer *first)
209{
210 if (level_first) {
211 timers->firsts[level] = level_first->time;
212 if (!first || level_first->time < first->time)
213 first = level_first;
214 } else {
215 timers->firsts[level] = -1ULL;
216 }
217 return first;
218}
219
220static bool level_may_beat(const struct timers *timers, size_t level,
221 const struct timer *first)

Callers 1

brute_force_firstFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected