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 <rusty@rustcorp.com.au>
Changelog-Fixed: JSON-RPC: `autoclean-once` response `uncleaned` count is now correct.
This commit is contained in:
Rusty Russell
2022-12-06 05:35:03 +10:30
committed by Christian Decker
parent 4613b29815
commit 24d7aad3d0

View File

@@ -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)