Skip to content

Commit 2afe7a1

Browse files
committed
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 <[email protected]>
1 parent 80dacd1 commit 2afe7a1

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

doc/lightning-pay.7.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@ implement your own heuristics rather than the primitive ones used
4444
here.
4545

4646
*description* is only required for bolt11 invoices which do not
47-
contain a description themselves, but contain a description hash.
47+
contain a description themselves, but contain a description hash:
48+
in this case *description* is required.
4849
*description* is then checked against the hash inside the invoice
4950
before it will be paid.
5051

plugins/pay.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1066,7 +1066,7 @@ static struct command_result *json_pay(struct command *cmd,
10661066
* - MUST check that the SHA2 256-bit hash in the `h` field
10671067
* exactly matches the hashed description.
10681068
*/
1069-
if (!b11->description && !deprecated_apis) {
1069+
if (!b11->description) {
10701070
if (!b11->description_hash) {
10711071
return command_fail(cmd,
10721072
JSONRPC2_INVALID_PARAMS,

0 commit comments

Comments
 (0)