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

Function main

plugins/autoclean.c:601–647  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

599};
600
601int main(int argc, char *argv[])
602{
603 setup_locale();
604 plugin_main(argv, init, PLUGIN_STATIC, true, NULL, commands, ARRAY_SIZE(commands),
605 NULL, 0, NULL, 0, NULL, 0,
606 plugin_option_deprecated("autocleaninvoice-cycle",
607 "string",
608 "Perform cleanup of expired invoices every"
609 " given seconds, or do not autoclean if 0",
610 u64_option, &deprecated_cycle_seconds),
611 plugin_option_deprecated("autocleaninvoice-expired-by",
612 "string",
613 "If expired invoice autoclean enabled,"
614 " invoices that have expired for at least"
615 " this given seconds are cleaned",
616 u64_option, &timer_cinfo.subsystem_age[EXPIREDINVOICES]),
617 plugin_option("autoclean-cycle",
618 "int",
619 "Perform cleanup every"
620 " given seconds",
621 u64_option, &cycle_seconds),
622 plugin_option("autoclean-succeededforwards-age",
623 "int",
624 "How old do successful forwards have to be before deletion (0 = never)",
625 u64_option, &timer_cinfo.subsystem_age[SUCCEEDEDFORWARDS]),
626 plugin_option("autoclean-failedforwards-age",
627 "int",
628 "How old do failed forwards have to be before deletion (0 = never)",
629 u64_option, &timer_cinfo.subsystem_age[FAILEDFORWARDS]),
630 plugin_option("autoclean-succeededpays-age",
631 "int",
632 "How old do successful pays have to be before deletion (0 = never)",
633 u64_option, &timer_cinfo.subsystem_age[SUCCEEDEDPAYS]),
634 plugin_option("autoclean-failedpays-age",
635 "int",
636 "How old do failed pays have to be before deletion (0 = never)",
637 u64_option, &timer_cinfo.subsystem_age[FAILEDPAYS]),
638 plugin_option("autoclean-paidinvoices-age",
639 "int",
640 "How old do paid invoices have to be before deletion (0 = never)",
641 u64_option, &timer_cinfo.subsystem_age[PAIDINVOICES]),
642 plugin_option("autoclean-expiredinvoices-age",
643 "int",
644 "How old do expired invoices have to be before deletion (0 = never)",
645 u64_option, &timer_cinfo.subsystem_age[EXPIREDINVOICES]),
646 NULL);
647}

Callers

nothing calls this directly

Calls 3

setup_localeFunction · 0.85
plugin_mainFunction · 0.85
plugin_optionClass · 0.70

Tested by

no test coverage detected