mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 07:04:22 +01:00
plugins/pay: revert removal of paying invoice without description.
It's still deprecated: we need the description since
1. This information is useful for any validation we want to do, such as
the HSM, or runes.
2. We want this information in listpays so we can tell what we actually paid.
3. In general, we should never sign commitments to things we don't have!
I expect to have this information about payments *whatever the frontend* is,
which is why we deprecated (and then removed) this unintended use. The spec
is pretty clear on this:
BOLT #11:
```
A reader:
...
- MUST check that the SHA2 256-bit hash in the `h` field exactly matches the hashed
description.
```
However, neither BTCPayServer nor lnbits updated despite the long deprecation
period, so revert 2afe7a1856.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -1067,7 +1067,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) {
|
||||
if (!b11->description && !deprecated_apis) {
|
||||
if (!b11->description_hash) {
|
||||
return command_fail(cmd,
|
||||
JSONRPC2_INVALID_PARAMS,
|
||||
|
||||
Reference in New Issue
Block a user