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

Function has_all_subdaemons

lightningd/lightningd.c:429–442  ·  view source on GitHub ↗

Check if all subdaemons exist in specified directory. */

Source from the content-addressed store, hash-verified

427
428/* Check if all subdaemons exist in specified directory. */
429static bool has_all_subdaemons(const char *daemon_dir)
430{
431 size_t i;
432 bool missing_daemon = false;
433
434 for (i = 0; i < ARRAY_SIZE(subdaemons); ++i) {
435 if (!path_is_file(path_join(tmpctx, daemon_dir, subdaemons[i]))) {
436 missing_daemon = true;
437 break;
438 }
439 }
440
441 return !missing_daemon;
442}
443
444/* Returns the directory this executable is running from */
445static const char *find_my_directory(const tal_t *ctx, const char *argv0)

Callers 1

find_daemon_dirFunction · 0.85

Calls 2

path_is_fileFunction · 0.85
path_joinFunction · 0.85

Tested by

no test coverage detected