From 24d7aad3d0ae16995056f489fbe675b7f01d75ff Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Tue, 6 Dec 2022 05:35:03 +1030 Subject: [PATCH] autoclean: fix uncleaned stats when we don't clean due to being too new. We only incremented this if it was the wrong state. Signed-off-by: Rusty Russell Changelog-Fixed: JSON-RPC: `autoclean-once` response `uncleaned` count is now correct. --- plugins/autoclean.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/autoclean.c b/plugins/autoclean.c index 1b2d51eb1..201dea4cb 100644 --- a/plugins/autoclean.c +++ b/plugins/autoclean.c @@ -223,7 +223,8 @@ static struct command_result *listinvoices_done(struct command *cmd, json_add_tok(req->js, "label", label, buf); json_add_tok(req->js, "status", status, buf); send_outreq(plugin, req); - } + } else + cinfo->num_uncleaned++; } if (cinfo->cleanup_reqs_remaining)