mirror of
https://github.com/aljazceru/lightning.git
synced 2026-01-22 07:14:22 +01:00
libplugin-pay: don't expose bolt11 details.
When we support bolt12, this won't exist. We only need min_final_cltv_expiry, routes and features, so put them into struct payment explicitly. We move the default final ctlv out to the caller, too, which is clearer. e.g. keysend was using this value, but it was hard to tell. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
committed by
neil saitug
parent
76124eb800
commit
54c57e7495
@@ -2022,13 +2022,15 @@ static struct command_result *json_paymod(struct command *cmd,
|
||||
p->local_id = &my_id;
|
||||
p->json_buffer = tal_steal(p, buf);
|
||||
p->json_toks = params;
|
||||
p->destination = &b11->receiver_id;
|
||||
p->destination = tal_dup(p, struct node_id, &b11->receiver_id);
|
||||
p->destination_has_tlv = feature_offered(b11->features, OPT_VAR_ONION);
|
||||
p->payment_hash = tal_dup(p, struct sha256, &b11->payment_hash);
|
||||
p->payment_secret = b11->payment_secret
|
||||
? tal_dup(p, struct secret, b11->payment_secret)
|
||||
: NULL;
|
||||
p->invoice = tal_steal(p, b11);
|
||||
p->routes = tal_steal(p, b11->routes);
|
||||
p->min_final_cltv_expiry = b11->min_final_cltv_expiry;
|
||||
p->features = tal_steal(p, b11->features);
|
||||
p->bolt11 = tal_steal(p, b11str);
|
||||
p->why = "Initial attempt";
|
||||
p->constraints.cltv_budget = *maxdelay;
|
||||
|
||||
Reference in New Issue
Block a user