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

Function find_blockdepthwatch

lightningd/watch.c:536–555  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

534}
535
536static struct blockdepthwatch *find_blockdepthwatch(const struct blockdepthwatch_hash *blockdepthwatches,
537 u32 blockheight,
538 enum watch_result (*depthcb)(struct lightningd *ld, u32 depth, void *),
539 enum watch_result (*reorgcb)(struct lightningd *ld, void *),
540 void *arg)
541{
542 struct blockdepthwatch_hash_iter it;
543
544 for (struct blockdepthwatch *w = blockdepthwatch_hash_first(blockdepthwatches, &it);
545 w;
546 w = blockdepthwatch_hash_next(blockdepthwatches, &it)) {
547 if (w->height == blockheight
548 && w->depthcb == depthcb
549 && w->reorgcb == reorgcb
550 && w->arg == arg) {
551 return w;
552 }
553 }
554 return NULL;
555}
556
557bool watch_blockdepth_(const tal_t *ctx,
558 struct chain_topology *topo,

Callers 1

watch_blockdepth_Function · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected