autoclean: various configuration options now dynamic.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Changed: Plugins: `autoclean` configuration variables now settable with `setconfig`.
This commit is contained in:
Rusty Russell
2023-06-06 10:08:53 +09:30
parent a65f2ef22a
commit f8f8045a06
3 changed files with 42 additions and 54 deletions

View File

@@ -631,29 +631,29 @@ int main(int argc, char *argv[])
"Perform cleanup every"
" given seconds",
u64_option, &cycle_seconds),
plugin_option("autoclean-succeededforwards-age",
"int",
"How old do successful forwards have to be before deletion (0 = never)",
u64_option, &timer_cinfo.subsystem_age[SUCCEEDEDFORWARDS]),
plugin_option("autoclean-failedforwards-age",
"int",
"How old do failed forwards have to be before deletion (0 = never)",
u64_option, &timer_cinfo.subsystem_age[FAILEDFORWARDS]),
plugin_option("autoclean-succeededpays-age",
"int",
"How old do successful pays have to be before deletion (0 = never)",
u64_option, &timer_cinfo.subsystem_age[SUCCEEDEDPAYS]),
plugin_option("autoclean-failedpays-age",
"int",
"How old do failed pays have to be before deletion (0 = never)",
u64_option, &timer_cinfo.subsystem_age[FAILEDPAYS]),
plugin_option("autoclean-paidinvoices-age",
"int",
"How old do paid invoices have to be before deletion (0 = never)",
u64_option, &timer_cinfo.subsystem_age[PAIDINVOICES]),
plugin_option("autoclean-expiredinvoices-age",
"int",
"How old do expired invoices have to be before deletion (0 = never)",
u64_option, &timer_cinfo.subsystem_age[EXPIREDINVOICES]),
plugin_option_dynamic("autoclean-succeededforwards-age",
"int",
"How old do successful forwards have to be before deletion (0 = never)",
u64_option, &timer_cinfo.subsystem_age[SUCCEEDEDFORWARDS]),
plugin_option_dynamic("autoclean-failedforwards-age",
"int",
"How old do failed forwards have to be before deletion (0 = never)",
u64_option, &timer_cinfo.subsystem_age[FAILEDFORWARDS]),
plugin_option_dynamic("autoclean-succeededpays-age",
"int",
"How old do successful pays have to be before deletion (0 = never)",
u64_option, &timer_cinfo.subsystem_age[SUCCEEDEDPAYS]),
plugin_option_dynamic("autoclean-failedpays-age",
"int",
"How old do failed pays have to be before deletion (0 = never)",
u64_option, &timer_cinfo.subsystem_age[FAILEDPAYS]),
plugin_option_dynamic("autoclean-paidinvoices-age",
"int",
"How old do paid invoices have to be before deletion (0 = never)",
u64_option, &timer_cinfo.subsystem_age[PAIDINVOICES]),
plugin_option_dynamic("autoclean-expiredinvoices-age",
"int",
"How old do expired invoices have to be before deletion (0 = never)",
u64_option, &timer_cinfo.subsystem_age[EXPIREDINVOICES]),
NULL);
}