plugins/pay: always include bolt11 (and description) in listpays.

We were setting it on the root, but that doesn't get handed to
sendpay.  Our schema doesn't *require* bolt11, either, so this was
missed (there could be a *bolt12* instead).

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Fixed: JSON-RPC: `listpays` always includes `bolt11` or `bolt12` field.
This commit is contained in:
Rusty Russell
2022-04-04 12:26:52 +09:30
parent e47786da04
commit f51a3d8ef7
5 changed files with 27 additions and 12 deletions

View File

@@ -255,6 +255,10 @@ struct payment {
* true. Set only on the root payment. */
bool abort;
/* We only set invstring/description on one of our sendpays per group,
* so we track when we've done that. */
bool invstring_used;
/* Serialized bolt11/12 string, kept attachd to the root so we can filter
* by the invoice. */
const char *invstring;