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>
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user