BOLT12: Remove years from recurrence.

Use months instead.

Changelog-EXPERIMENTAL: Protocol: BOLT 12 recurrence `years` removed; use 12 x months.
This commit is contained in:
Rusty Russell
2025-09-29 13:12:44 +09:30
parent 6af7fc64d2
commit 05005475e3
7 changed files with 9 additions and 26 deletions

View File

@@ -99,7 +99,7 @@ static struct command_result *param_amount(struct command *cmd,
}
/* BOLT 13:
* - MUST set `time_unit` to 0 (seconds), 1 (days), 2 (months), 3 (years).
* - MUST set `time_unit` to 0 (seconds), 1 (days), or 2 (months).
*/
struct time_string {
const char *suffix;
@@ -124,8 +124,6 @@ static const struct time_string *json_to_time(const char *buffer,
{ "weeks", 1, 7 },
{ "month", 2, 1 },
{ "months", 2, 1 },
{ "year", 3, 1 },
{ "years", 3, 1 },
};
for (size_t i = 0; i < ARRAY_SIZE(suffixes); i++) {