mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-02-21 22:31:48 +01:00
lightningd: temporarily ignore missing payment_secret for bolt12.
We're going to mess with it in the next patch... Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
85cb302b65
commit
a5471a405b
2 changed files with 8 additions and 3 deletions
|
@ -116,9 +116,12 @@ void htlc_set_add(struct lightningd *ld,
|
|||
return;
|
||||
}
|
||||
|
||||
/* FIXME! */
|
||||
bool ignore_secret = details->invstring && strstarts(details->invstring, "lni1");
|
||||
|
||||
/* If we insist on a payment secret, it must always have it */
|
||||
if (feature_is_set(details->features, COMPULSORY_FEATURE(OPT_PAYMENT_SECRET))
|
||||
&& !payment_secret) {
|
||||
&& !payment_secret && !ignore_secret) {
|
||||
log_debug(ld->log, "Missing payment_secret, but required for %s",
|
||||
type_to_string(tmpctx, struct sha256,
|
||||
&hin->payment_hash));
|
||||
|
|
|
@ -396,6 +396,8 @@ invoice_check_payment(const tal_t *ctx,
|
|||
}
|
||||
|
||||
details = wallet_invoice_details(ctx, ld->wallet, invoice);
|
||||
/* FIXME! */
|
||||
bool ignore_secret = details->invstring && strstarts(details->invstring, "lni1");
|
||||
|
||||
/* BOLT #4:
|
||||
* - if the `payment_secret` doesn't match the expected value for that
|
||||
|
@ -404,13 +406,13 @@ invoice_check_payment(const tal_t *ctx,
|
|||
* - MUST fail the HTLC.
|
||||
*/
|
||||
if (feature_is_set(details->features, COMPULSORY_FEATURE(OPT_VAR_ONION))
|
||||
&& !payment_secret) {
|
||||
&& !payment_secret && !ignore_secret) {
|
||||
log_debug(ld->log, "Attept to pay %s without secret",
|
||||
type_to_string(tmpctx, struct sha256, &details->rhash));
|
||||
return tal_free(details);
|
||||
}
|
||||
|
||||
if (payment_secret) {
|
||||
if (payment_secret && !ignore_secret) {
|
||||
struct secret expected;
|
||||
|
||||
if (details->invstring && strstarts(details->invstring, "lni1"))
|
||||
|
|
Loading…
Add table
Reference in a new issue