Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 15 additions & 13 deletions contrib/msggen/msggen/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -1860,7 +1860,9 @@
" * `failedpays`: payment attempts which did not succeed (`failed` in listpays `status`).",
" * `succeededpays`: payment attempts which succeeded (`complete` in listpays `status`).",
" * `expiredinvoices`: invoices which were not paid (and cannot be) (`expired` in listinvoices `status`).",
" * `paidinvoices`: invoices which were paid (`paid` in listinvoices `status)."
" * `paidinvoices`: invoices which were paid (`paid` in listinvoices `status).",
"",
"NOTE: until v25.12, the `uncleaned` field contained all entries not removed (e.g. in `failedforwards` it counted all forwards, not just failed ones). This was an interface only an engineer could love, so it was fixed."
]
},
"age": {
Expand Down Expand Up @@ -1892,13 +1894,13 @@
"cleaned": {
"type": "u64",
"description": [
"Total number of deletions done this run."
"The number of successful forwards deleted."
]
},
"uncleaned": {
"type": "u64",
"description": [
"The total number of entries *not* deleted this run."
"The number of successful forwards *not* deleted (too new)."
]
}
}
Expand All @@ -1914,13 +1916,13 @@
"cleaned": {
"type": "u64",
"description": [
"Total number of deletions done this run."
"The number of failed forwards deleted."
]
},
"uncleaned": {
"type": "u64",
"description": [
"The total number of entries *not* deleted this run."
"The number of failed forwards *not* deleted (too new)."
]
}
}
Expand All @@ -1936,13 +1938,13 @@
"cleaned": {
"type": "u64",
"description": [
"Total number of deletions done this run."
"The number of successful payments deleted."
]
},
"uncleaned": {
"type": "u64",
"description": [
"The total number of entries *not* deleted this run."
"The number of successful forwards *not* deleted (too new)."
]
}
}
Expand All @@ -1958,13 +1960,13 @@
"cleaned": {
"type": "u64",
"description": [
"Total number of deletions done this run."
"The number of unsuccessful payments deleted."
]
},
"uncleaned": {
"type": "u64",
"description": [
"The total number of entries *not* deleted this run."
"The number of unsuccessful payments *not* deleted (too new)."
]
}
}
Expand All @@ -1980,13 +1982,13 @@
"cleaned": {
"type": "u64",
"description": [
"Total number of deletions done this run."
"The number of paid invoices deleted."
]
},
"uncleaned": {
"type": "u64",
"description": [
"The total number of entries *not* deleted this run."
"The number of paid invoices *not* deleted (too new)."
]
}
}
Expand All @@ -2002,13 +2004,13 @@
"cleaned": {
"type": "u64",
"description": [
"Total number of deletions done this run."
"The number of expired invoices deleted."
]
},
"uncleaned": {
"type": "u64",
"description": [
"The total number of entries *not* deleted this run."
"The number of expired invoices *not* deleted (too new)."
]
}
}
Expand Down
28 changes: 15 additions & 13 deletions doc/schemas/autoclean-once.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@
" * `failedpays`: payment attempts which did not succeed (`failed` in listpays `status`).",
" * `succeededpays`: payment attempts which succeeded (`complete` in listpays `status`).",
" * `expiredinvoices`: invoices which were not paid (and cannot be) (`expired` in listinvoices `status`).",
" * `paidinvoices`: invoices which were paid (`paid` in listinvoices `status)."
" * `paidinvoices`: invoices which were paid (`paid` in listinvoices `status).",
"",
"NOTE: until v25.12, the `uncleaned` field contained all entries not removed (e.g. in `failedforwards` it counted all forwards, not just failed ones). This was an interface only an engineer could love, so it was fixed."
]
},
"age": {
Expand Down Expand Up @@ -62,13 +64,13 @@
"cleaned": {
"type": "u64",
"description": [
"Total number of deletions done this run."
"The number of successful forwards deleted."
]
},
"uncleaned": {
"type": "u64",
"description": [
"The total number of entries *not* deleted this run."
"The number of successful forwards *not* deleted (too new)."
]
}
}
Expand All @@ -84,13 +86,13 @@
"cleaned": {
"type": "u64",
"description": [
"Total number of deletions done this run."
"The number of failed forwards deleted."
]
},
"uncleaned": {
"type": "u64",
"description": [
"The total number of entries *not* deleted this run."
"The number of failed forwards *not* deleted (too new)."
]
}
}
Expand All @@ -106,13 +108,13 @@
"cleaned": {
"type": "u64",
"description": [
"Total number of deletions done this run."
"The number of successful payments deleted."
]
},
"uncleaned": {
"type": "u64",
"description": [
"The total number of entries *not* deleted this run."
"The number of successful forwards *not* deleted (too new)."
]
}
}
Expand All @@ -128,13 +130,13 @@
"cleaned": {
"type": "u64",
"description": [
"Total number of deletions done this run."
"The number of unsuccessful payments deleted."
]
},
"uncleaned": {
"type": "u64",
"description": [
"The total number of entries *not* deleted this run."
"The number of unsuccessful payments *not* deleted (too new)."
]
}
}
Expand All @@ -150,13 +152,13 @@
"cleaned": {
"type": "u64",
"description": [
"Total number of deletions done this run."
"The number of paid invoices deleted."
]
},
"uncleaned": {
"type": "u64",
"description": [
"The total number of entries *not* deleted this run."
"The number of paid invoices *not* deleted (too new)."
]
}
}
Expand All @@ -172,13 +174,13 @@
"cleaned": {
"type": "u64",
"description": [
"Total number of deletions done this run."
"The number of expired invoices deleted."
]
},
"uncleaned": {
"type": "u64",
"description": [
"The total number of entries *not* deleted this run."
"The number of expired invoices *not* deleted (too new)."
]
}
}
Expand Down
2 changes: 0 additions & 2 deletions plugins/autoclean.c
Original file line number Diff line number Diff line change
Expand Up @@ -511,13 +511,11 @@ static struct command_result *list_done(struct command *cmd,

variant = ops->get_variant(buf, t, subsystem, &timestamp);
if (!variant) {
subsystem->num_uncleaned++;
continue;
}

/* Continue if we don't care. */
if (variant->age == 0) {
subsystem->num_uncleaned++;
continue;
}

Expand Down
6 changes: 3 additions & 3 deletions tests/test_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -3078,7 +3078,7 @@ def test_autoclean_once(node_factory):
# Make sure > 1 second old!
time.sleep(2)
assert (l1.rpc.autoclean_once('failedpays', 1)
== {'autoclean': {'failedpays': {'cleaned': 1, 'uncleaned': 1}}})
== {'autoclean': {'failedpays': {'cleaned': 1, 'uncleaned': 0}}})
assert l1.rpc.autoclean_status() == {'autoclean': {'failedpays': {'enabled': False,
'cleaned': 1},
'succeededpays': {'enabled': False,
Expand Down Expand Up @@ -3106,7 +3106,7 @@ def test_autoclean_once(node_factory):
'paidinvoices': {'enabled': False,
'cleaned': 0}}}
assert (l2.rpc.autoclean_once('failedforwards', 1)
== {'autoclean': {'failedforwards': {'cleaned': 1, 'uncleaned': 1}}})
== {'autoclean': {'failedforwards': {'cleaned': 1, 'uncleaned': 0}}})
assert l2.rpc.autoclean_status() == {'autoclean': {'failedpays': {'enabled': False,
'cleaned': 0},
'succeededpays': {'enabled': False,
Expand Down Expand Up @@ -3134,7 +3134,7 @@ def test_autoclean_once(node_factory):
'paidinvoices': {'enabled': False,
'cleaned': 0}}}
assert (l3.rpc.autoclean_once('expiredinvoices', 1)
== {'autoclean': {'expiredinvoices': {'cleaned': 1, 'uncleaned': 1}}})
== {'autoclean': {'expiredinvoices': {'cleaned': 1, 'uncleaned': 0}}})
assert l3.rpc.autoclean_status() == {'autoclean': {'failedpays': {'enabled': False,
'cleaned': 0},
'succeededpays': {'enabled': False,
Expand Down
Loading