Include PaymentId in payer metadata
authorJeffrey Czyz <jkczyz@gmail.com>
Fri, 21 Jul 2023 20:28:36 +0000 (15:28 -0500)
committerJeffrey Czyz <jkczyz@gmail.com>
Tue, 29 Aug 2023 16:08:11 +0000 (11:08 -0500)
commit7a3e06b1e791e752dbe2cbd4747747c1611ad6f7
treec37fda4e99f39aa0dadb578018eb2171d50c9c03
parent861e0eee9e2461fbb2c21454da746f5def5d39a5
Include PaymentId in payer metadata

When receiving a BOLT 12 invoice originating from either an invoice
request or a refund, the invoice should only be paid once. To accomplish
this, require that the invoice includes an encrypted payment id in the
payer metadata. This allows ChannelManager to track a payment when
requesting but prior to receiving the invoice. Thus, it can determine if
the invoice has already been paid.
lightning/src/ln/channelmanager.rs
lightning/src/ln/inbound_payment.rs
lightning/src/offers/invoice.rs
lightning/src/offers/invoice_request.rs
lightning/src/offers/offer.rs
lightning/src/offers/refund.rs
lightning/src/offers/signer.rs