mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-24 01:24:26 +01:00
patch remove-payer-backcompat.patch
This commit is contained in:
committed by
neil saitug
parent
e4e1396447
commit
424ac84263
@@ -674,10 +674,7 @@ static void json_add_invoice_request(struct json_stream *js,
|
||||
* - MUST fail the request if there is no `payer_signature` field.
|
||||
* - MUST fail the request if `payer_signature` is not correct.
|
||||
*/
|
||||
/* Older spec didn't have this, so we allow omission for now. */
|
||||
if (invreq->payer_signature) {
|
||||
json_add_bip340sig(js, "payer_signature",
|
||||
invreq->payer_signature);
|
||||
if (invreq->payer_key
|
||||
&& !bolt12_check_signature(invreq->fields,
|
||||
"invoice_request",
|
||||
@@ -691,21 +688,7 @@ static void json_add_invoice_request(struct json_stream *js,
|
||||
} else {
|
||||
json_add_string(js, "warning_invoice_request_missing_payer_signature",
|
||||
"Missing payer_signature");
|
||||
if (!deprecated_apis)
|
||||
valid = false;
|
||||
}
|
||||
|
||||
if (deprecated_apis && invreq->recurrence_counter) {
|
||||
if (invreq->payer_key
|
||||
&& !bolt12_check_signature(invreq->fields,
|
||||
"invoice_request",
|
||||
"recurrence_signature",
|
||||
invreq->payer_key,
|
||||
invreq->recurrence_signature)) {
|
||||
json_add_string(js, "warning_invoice_request_invalid_recurrence_signature",
|
||||
"Bad recurrence_signature");
|
||||
valid = false;
|
||||
}
|
||||
valid = false;
|
||||
}
|
||||
|
||||
json_add_bool(js, "valid", valid);
|
||||
|
||||
Reference in New Issue
Block a user