mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 15:14:23 +01:00
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 <rusty@rustcorp.com.au>
This commit is contained in:
@@ -44,7 +44,8 @@ implement your own heuristics rather than the primitive ones used
|
|||||||
here.
|
here.
|
||||||
|
|
||||||
*description* is only required for bolt11 invoices which do not
|
*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
|
*description* is then checked against the hash inside the invoice
|
||||||
before it will be paid.
|
before it will be paid.
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
* - MUST check that the SHA2 256-bit hash in the `h` field
|
||||||
* exactly matches the hashed description.
|
* exactly matches the hashed description.
|
||||||
*/
|
*/
|
||||||
if (!b11->description && !deprecated_apis) {
|
if (!b11->description) {
|
||||||
if (!b11->description_hash) {
|
if (!b11->description_hash) {
|
||||||
return command_fail(cmd,
|
return command_fail(cmd,
|
||||||
JSONRPC2_INVALID_PARAMS,
|
JSONRPC2_INVALID_PARAMS,
|
||||||
|
|||||||
Reference in New Issue
Block a user