Description
Prior to v0.1 LDK only offered PaymentId
s for outbound payments, which led us to track inbound payments by an ID derived for the payment hash. This was always messy as the latter is only available for BOLT11 payments, resulting in BOLT11 payments being added to the payment store upon invoice creation, and BOLT12 payments only being added upon receiving the invoice request.
With lightningdevkit/rust-lightning#3303 LDK added PaymentId
s for inbound payments, so we should switch to use them in a backwards-compatible manner (i.e., probably still checking whether the old-style ID is available in the store for now). However, as this will mean we that we can't add the payment store entry upon invoice creation also for BOLT11 payments, we finally need a different solution to store additional metadata (invoices, but also JIT-channel fee limits) before receiving the payment. That is we need to add a PaymentMetatdataStore
or similar.