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

Function first_for_level

ccan/ccan/timer/timer.c:197–210  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

195
196/* Update level's first watermark, and return overall first. */
197static const struct timer *first_for_level(struct timers *timers,
198 size_t level,
199 const struct timer *level_first,
200 const struct timer *first)
201{
202 if (level_first) {
203 timers->firsts[level] = level_first->time;
204 if (!first || level_first->time < first->time)
205 first = level_first;
206 } else {
207 timers->firsts[level] = -1ULL;
208 }
209 return first;
210}
211
212static bool level_may_beat(const struct timers *timers, size_t level,
213 const struct timer *first)

Callers 1

brute_force_firstFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected