mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-01-18 13:25:43 +01:00
plugins/pay: use feature set from lightningd to decode bolt11.
This means we correctly reject invoices with features we don't understand. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
41ebaffba3
commit
ca512e3cb2
@ -1283,8 +1283,8 @@ static struct command_result *json_pay(struct command *cmd,
|
||||
NULL))
|
||||
return command_param_failed();
|
||||
|
||||
/* FIXME: We need to know our features! */
|
||||
b11 = bolt11_decode(cmd, b11str, NULL, NULL, &fail);
|
||||
b11 = bolt11_decode(cmd, b11str, plugin_feature_set(cmd->plugin),
|
||||
NULL, &fail);
|
||||
if (!b11) {
|
||||
return command_fail(cmd, JSONRPC2_INVALID_PARAMS,
|
||||
"Invalid bolt11: %s", fail);
|
||||
|
Loading…
Reference in New Issue
Block a user