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

Function priorityqueue_pop

plugins/askrene/child/priorityqueue.c:137–147  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

135}
136
137void priorityqueue_pop(struct priorityqueue *q) {
138 if (q->heapsize == 0) return;
139
140 const u32 top = priorityqueue_top(q);
141 assert(q->heapptr[top] == q->base);
142
143 global_priorityqueue = q;
144 gheap_pop_heap(&q->gheap_ctx, q->base, q->heapsize--);
145 global_priorityqueue = NULL;
146 q->heapptr[top] = NULL;
147}
148
149const s64 *priorityqueue_value(const struct priorityqueue *q) {
150 return q->value;

Callers 3

mainFunction · 0.85
dijkstra_pathFunction · 0.85
dijkstra_nearest_sinkFunction · 0.85

Calls 1

priorityqueue_topFunction · 0.85

Tested by 1

mainFunction · 0.68