Open brandoncurtis opened 5 years ago
Seems like no one has picked this one up yet, so would be happy to give this one a try.
Are you sure this is the correct approach? I see two potential issues:
For these reasons, I don't feel like this feature should be implemented. Maybe we should close it.
CC @bjarnemagnussen @carlaKC @Roasbeef @guggero
Background
Fallback addresses can be added to BOLT-11 invoices so that a payment can be made on-chain if an off-chain payment is not possible or desirable. However, an invoice's state is not updated to reflect payment is the invoice recipient pays to this fallback address.
Your environment
Steps to reproduce
lncli addinvoice --fallback_addr $FALLBACKADDR --amt $AMT
lncli listinvoices
. The invoicesettled
field will befalse
.Expected behaviour
If an invoice recipient uses the fallback address to send an on-chain payment of the correct size, the invoice in which this fallback address was included will be marked as
settled
.Additional Considerations
It's possible an invoice generator could reuse a fallback address within multiple invoices for a payment of the same size, which could make it ambiguous what should be marked as paid if a payment is made to that address.
LND could prevent reuse of fallback addresses within multiple invoices, or at least reuse within invoices for a payment of the same size, to remove this ambiguity.
LND could prevent fallback address reuse in any 0-amt invoices.