plugins/pay: send payment_metadata if provided in invoice.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Added: Protocol: `pay` (and decode, etc) supports bolt11 payment_metadata a-la https://github.com/lightning/bolts/pull/912
This commit is contained in:
Rusty Russell
2022-03-31 19:40:50 +10:30
parent 7f89763f9e
commit 1c685ce3e8
5 changed files with 48 additions and 6 deletions

View File

@@ -179,6 +179,7 @@ static struct command_result *json_keysend(struct command *cmd, const char *buf,
p->json_toks = params;
p->destination = tal_steal(p, destination);
p->payment_secret = NULL;
p->payment_metadata = NULL;
p->amount = *msat;
p->routes = tal_steal(p, hints);
// 22 is the Rust-Lightning default and the highest minimum we know of.