Skip to content

Commit e825947

Browse files
committed
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 <rusty@rustcorp.com.au>
1 parent a464ef9 commit e825947

3 files changed

Lines changed: 0 additions & 7 deletions

File tree

plugins/keysend.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -221,8 +221,6 @@ static struct command_result *json_keysend(struct command *cmd, const char *buf,
221221

222222
p = payment_new(cmd, cmd, NULL /* No parent */, global_hints, pay_mods);
223223
p->local_id = &my_id;
224-
p->json_buffer = tal_dup_talarr(p, const char, buf);
225-
p->json_toks = params;
226224
p->route_destination = tal_steal(p, destination);
227225
p->pay_destination = p->route_destination;
228226
p->payment_secret = NULL;

plugins/libplugin-pay.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,9 +148,6 @@ struct payment {
148148
struct plugin *plugin;
149149
struct node_id *local_id;
150150

151-
const char *json_buffer;
152-
const jsmntok_t *json_toks;
153-
154151
/* The current phase we are in. */
155152
enum payment_step step;
156153

plugins/pay.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1468,8 +1468,6 @@ static struct command_result *json_pay(struct command *cmd,
14681468
}
14691469

14701470
p->local_id = &my_id;
1471-
p->json_buffer = buf;
1472-
p->json_toks = params;
14731471
p->why = "Initial attempt";
14741472
p->constraints.cltv_budget = *maxdelay;
14751473
tal_free(maxdelay);

0 commit comments

Comments
 (0)