From 2afe7a1856b04177898e2dea6b1050d4c8477d87 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Mon, 12 Dec 2022 16:33:04 +1030 Subject: [PATCH] pay: remove description_hash without description. Deprecated v0.11.0. Changelog-Removed: JSON-RPC: `pay` for a bolt11 which uses a `description_hash`, without setting `description` (deprecated v0.11.0). Signed-off-by: Rusty Russell --- doc/lightning-pay.7.md | 3 ++- plugins/pay.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/doc/lightning-pay.7.md b/doc/lightning-pay.7.md index e4a67b268557..97c214d6dc28 100644 --- a/doc/lightning-pay.7.md +++ b/doc/lightning-pay.7.md @@ -44,7 +44,8 @@ implement your own heuristics rather than the primitive ones used here. *description* is only required for bolt11 invoices which do not -contain a description themselves, but contain a description hash. +contain a description themselves, but contain a description hash: +in this case *description* is required. *description* is then checked against the hash inside the invoice before it will be paid. diff --git a/plugins/pay.c b/plugins/pay.c index 92e3847e7821..faa456df8ecf 100644 --- a/plugins/pay.c +++ b/plugins/pay.c @@ -1066,7 +1066,7 @@ static struct command_result *json_pay(struct command *cmd, * - MUST check that the SHA2 256-bit hash in the `h` field * exactly matches the hashed description. */ - if (!b11->description && !deprecated_apis) { + if (!b11->description) { if (!b11->description_hash) { return command_fail(cmd, JSONRPC2_INVALID_PARAMS,