From ca512e3cb277985f38ebc8c32e858d4092cf46e0 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Thu, 2 Apr 2020 14:38:47 +1030 Subject: [PATCH] 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 --- plugins/pay.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/pay.c b/plugins/pay.c index cc55f703e..ffae830d6 100644 --- a/plugins/pay.c +++ b/plugins/pay.c @@ -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);