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:
Rusty Russell
2020-12-03 20:03:55 +10:30
committed by neil saitug
parent 76124eb800
commit 54c57e7495
5 changed files with 35 additions and 32 deletions

View File

@@ -232,7 +232,10 @@ struct payment {
void **modifier_data;
int current_modifier;
struct bolt11 *invoice;
/* Information from the invoice. */
u32 min_final_cltv_expiry;
struct route_info **routes;
const u8 *features;
/* tal_arr of channel_hints we incrementally learn while performing
* payment attempts. */