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

Function priorityqueue_item_mover

plugins/askrene/child/priorityqueue.c:31–38  ·  view source on GitHub ↗

The heap move operator for priorityqueue search. */

Source from the content-addressed store, hash-verified

29
30/* The heap move operator for priorityqueue search. */
31static void priorityqueue_item_mover(void *const dst, const void *const src) {
32 u32 src_idx = *(u32 *)src;
33 *(u32 *)dst = src_idx;
34
35 /* we keep track of the pointer position of each element in the heap,
36 * for easy update. */
37 global_priorityqueue->heapptr[src_idx] = dst;
38}
39
40/* Allocation of resources for the heap. */
41struct priorityqueue *priorityqueue_new(const tal_t *ctx,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected