From dd7cc71b3847e507ef7c6437b70f3faae83e4915 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Thu, 23 Oct 2025 14:23:03 +1030 Subject: [PATCH] plugins: remove unused json_buffer / json_toks members from libplugin-pay. They were never referenced, and saving the toks is questionable since their lifetime is not guaranteed to live beyond this call (at least the buffer was duplicated, but that also assumed it was at the start of the object). Signed-off-by: Rusty Russell --- plugins/keysend.c | 2 -- plugins/libplugin-pay.h | 3 --- plugins/pay.c | 2 -- 3 files changed, 7 deletions(-) diff --git a/plugins/keysend.c b/plugins/keysend.c index aed5511fe..6fdc4f18b 100644 --- a/plugins/keysend.c +++ b/plugins/keysend.c @@ -221,8 +221,6 @@ static struct command_result *json_keysend(struct command *cmd, const char *buf, p = payment_new(cmd, cmd, NULL /* No parent */, global_hints, pay_mods); p->local_id = &my_id; - p->json_buffer = tal_dup_talarr(p, const char, buf); - p->json_toks = params; p->route_destination = tal_steal(p, destination); p->pay_destination = p->route_destination; p->payment_secret = NULL; diff --git a/plugins/libplugin-pay.h b/plugins/libplugin-pay.h index 4df7d3fca..1498f0fb4 100644 --- a/plugins/libplugin-pay.h +++ b/plugins/libplugin-pay.h @@ -148,9 +148,6 @@ struct payment { struct plugin *plugin; struct node_id *local_id; - const char *json_buffer; - const jsmntok_t *json_toks; - /* The current phase we are in. */ enum payment_step step; diff --git a/plugins/pay.c b/plugins/pay.c index ba1353a54..acb532c3a 100644 --- a/plugins/pay.c +++ b/plugins/pay.c @@ -1468,8 +1468,6 @@ static struct command_result *json_pay(struct command *cmd, } p->local_id = &my_id; - p->json_buffer = buf; - p->json_toks = params; p->why = "Initial attempt"; p->constraints.cltv_budget = *maxdelay; tal_free(maxdelay);