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

Function main

plugins/bwatch/bwatch.c:487–510  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

485};
486
487int main(int argc, char *argv[])
488{
489 struct bwatch *bwatch;
490
491 setup_locale();
492 bwatch = tal(NULL, struct bwatch);
493 bwatch->poll_interval_ms = 30000;
494 bwatch->experimental = false;
495
496 plugin_main(argv, init, take(bwatch), PLUGIN_RESTARTABLE, true, NULL,
497 commands, ARRAY_SIZE(commands),
498 NULL, 0,
499 NULL, 0,
500 NULL, 0,
501 plugin_option("experimental-bwatch", "flag",
502 "experimental: enable the bwatch chain"
503 " watcher (off by default)",
504 flag_option, flag_jsonfmt,
505 &bwatch->experimental),
506 plugin_option("bwatch-poll-interval", "int",
507 "Milliseconds between chain polls (default: 30000)",
508 u32_option, u32_jsonfmt, &bwatch->poll_interval_ms),
509 NULL);
510}

Callers

nothing calls this directly

Calls 3

setup_localeFunction · 0.85
plugin_mainFunction · 0.50
plugin_optionClass · 0.50

Tested by

no test coverage detected