From ef5a9bd0dee85288ce562562a86fb7ee449da8d0 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Thu, 20 Nov 2025 10:34:50 +1030 Subject: [PATCH] bookkeeper: fix printing of bad JSON results. I noticed this in the logs: ``` listinvoices: description/bolt11/bolt12 not found ( {"jsonrpc":"2) ``` And we make the same formatting mistake in several places. Signed-off-by: Rusty Russell --- plugins/bkpr/bookkeeper.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/bkpr/bookkeeper.c b/plugins/bkpr/bookkeeper.c index 7521b210c..72cda38f0 100644 --- a/plugins/bkpr/bookkeeper.c +++ b/plugins/bkpr/bookkeeper.c @@ -238,12 +238,12 @@ getblockheight_done(struct command *cmd, if (!blockheight_tok) plugin_err(cmd->plugin, "getblockheight: " "getinfo gave no 'blockheight'? '%.*s'", - result->end - result->start, buf); + result->end - result->start, buf + result->start); if (!json_to_u32(buf, blockheight_tok, &blockheight)) plugin_err(cmd->plugin, "getblockheight: " "getinfo gave non-unsigned-32-bit 'blockheight'? '%.*s'", - result->end - result->start, buf); + result->end - result->start, buf + result->start); /* Get the income events */ apys = compute_channel_apys(cmd, bkpr, cmd, @@ -1013,7 +1013,7 @@ listinvoices_done(struct command *cmd, "listinvoices:" " description/bolt11/bolt12" " not found (%.*s)", - result->end - result->start, buf); + result->end - result->start, buf + result->start); return rinfo_one_done(cmd, phinfo->rinfo); } @@ -1053,7 +1053,7 @@ listsendpays_done(struct command *cmd, plugin_log(cmd->plugin, LOG_DBG, "listpays: bolt11/bolt12 not found:" "(%.*s)", - result->end - result->start, buf); + result->end - result->start, buf + result->start); return rinfo_one_done(cmd, phinfo->rinfo); }