diff --git a/lightningd/htlc_set.c b/lightningd/htlc_set.c index 40e5caa68..500414a19 100644 --- a/lightningd/htlc_set.c +++ b/lightningd/htlc_set.c @@ -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)); diff --git a/lightningd/invoice.c b/lightningd/invoice.c index b26a84f5a..b8e0dcbe9 100644 --- a/lightningd/invoice.c +++ b/lightningd/invoice.c @@ -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"))