Skip to content

Commit

Permalink
pay: remove description_hash without description.
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
rustyrussell committed Dec 12, 2022
1 parent 80dacd1 commit 2afe7a1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion doc/lightning-pay.7.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion plugins/pay.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 2afe7a1

Please sign in to comment.