From 094f43c207a16ea970b2ad6b459e49780b2f33ed Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Mon, 25 Mar 2024 11:07:52 +1030 Subject: [PATCH] autoclean: remove deprecated configs. Changelog-Removed: Config: `autocleaninvoice-cycle` and `autocleaninvoice-expired-by` (deprecated v22.11, EOL v24.02) Signed-off-by: Rusty Russell --- doc/developers-guide/deprecations.md | 2 -- plugins/autoclean.c | 23 ----------------------- 2 files changed, 25 deletions(-) diff --git a/doc/developers-guide/deprecations.md b/doc/developers-guide/deprecations.md index 595b2113a..b6862766e 100644 --- a/doc/developers-guide/deprecations.md +++ b/doc/developers-guide/deprecations.md @@ -7,8 +7,6 @@ hidden: false | Name | Type | First Deprecated | Last Supported | Description | |--------------------------------------|--------------------|------------------|----------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| autocleaninvoice-cycle | Config | v22.11 | v24.02 | Now always once per hour: you can run `autoclean-once` regularly if you need. | -| autocleaninvoice-expired-by | Config | v22.11 | v24.02 | `autoclean`'s `autoclean-expiredinvoices-age` | | feerates.delayed_to_us | Field | v23.05 | v24.02 | Not used with anchor outputs. | | feerates.htlc_resolution | Field | v23.05 | v24.02 | Not used with anchor outputs. | | listconfigs.configlist | Fields | v23.08 | v24.08 | Instead of direct members with names equal the config variable, there's now a `configs` sub-object containing a member with details of each config setting | diff --git a/plugins/autoclean.c b/plugins/autoclean.c index 7e8494b69..0e4f9b7f4 100644 --- a/plugins/autoclean.c +++ b/plugins/autoclean.c @@ -55,8 +55,6 @@ struct clean_info { u64 num_uncleaned; }; -/* For deprecated API, setting this to zero disabled autoclean */ -static u64 deprecated_cycle_seconds = UINT64_MAX; static u64 cycle_seconds = 3600; static struct clean_info timer_cinfo; static u64 total_cleaned[NUM_SUBSYSTEM]; @@ -566,14 +564,6 @@ static const char *init(struct plugin *p, const char *buf UNUSED, const jsmntok_t *config UNUSED) { plugin = p; - if (deprecated_cycle_seconds != UINT64_MAX) { - if (deprecated_cycle_seconds == 0) { - plugin_log(p, LOG_DBG, "autocleaning not active"); - return NULL; - } else - cycle_seconds = deprecated_cycle_seconds; - } - cleantimer = plugin_timer(p, time_from_sec(cycle_seconds), do_clean_timer, NULL); /* We don't care if this fails (it usually does, since entries @@ -633,19 +623,6 @@ int main(int argc, char *argv[]) setup_locale(); plugin_main(argv, init, PLUGIN_STATIC, true, NULL, commands, ARRAY_SIZE(commands), NULL, 0, NULL, 0, NULL, 0, - plugin_option_deprecated("autocleaninvoice-cycle", - "string", - "Perform cleanup of expired invoices every" - " given seconds, or do not autoclean if 0", - "v22.11", "v24.02", - u64_option, &deprecated_cycle_seconds), - plugin_option_deprecated("autocleaninvoice-expired-by", - "string", - "If expired invoice autoclean enabled," - " invoices that have expired for at least" - " this given seconds are cleaned", - "v22.11", "v24.02", - u64_option, &timer_cinfo.subsystem_age[EXPIREDINVOICES]), plugin_option_dynamic("autoclean-cycle", "int", "Perform cleanup every"