Commit Graph

14 Commits

Author SHA1 Message Date
Elle Mouton
b0d3e4dc0d
multi: extract path ID and total amt from received payment
We've covered all the logic for building a blinded path to ourselves and
putting that into an invoice - so now we start preparing to actually be
able to recognise the incoming payment as one from a blinded path we
created.

The incoming update_add_htlc will have an `encrypted_recipient_data`
blob for us that we would have put in the original invoice. From this we
extract the PathID which we wrote. We consider this the payment address
and we use this to derive the associated invoice location.

Blinded path payments will not include MPP records, so the payment
address and total payment amount must be gleaned from the pathID and new
totalAmtMsat onion field respectively.

This commit only covers the final hop payload of a hop in a blinded
path. Dummy hops will be handled in the following commit.
2024-07-26 09:54:18 +02:00
Andras Banki-Horvath
ecbfc46312
invoices+channeldb: add InvoiceUpdater interface and the KV impl
This commit introduces the InvoiceUpdater interface which is meant
to abstract and assist the in-memory invoice update procedure with
the accompanying database updates. These abstract updater steps will
enable further refactoring later while also ensuring that a full
SQL implementation of the InvoiceDB interface will be possible.
2024-02-19 20:47:24 +01:00
yyforyongyu
18333e8c7d
multi: fix timestamp filters for invoice query
This commit fixes the timestamp precision to always compare the dates
using unix seconds for invoices.
2024-02-05 15:26:43 +08:00
bitcoin-lightning
b72fc9529e docs: fix typos 2023-12-21 15:21:35 +00:00
Andras Banki-Horvath
8bf7503aa4
invoices: remove the now unused ScanInvoices method 2023-10-18 16:15:58 +02:00
Andras Banki-Horvath
8ab267ad90
channeldb: add k/v implementation for InvoiceDB.DeleteCanceledInvoices method 2023-10-18 16:15:58 +02:00
Andras Banki-Horvath
1f8065de35
channeldb: add k/v implementation for InvoiceDB.FetchPendingInvoices 2023-10-18 16:15:57 +02:00
András Bánki-Horváth
ad5cd9c8bb
multi: extend InvoiceDB methods with a context argument (#8066)
* multi: extend InvoiceDB methods with a context argument

This commit adds a context to InvoiceDB's methods. Along this refactor
we also extend InvoiceRegistry methods with contexts where it makes
sense. This change is essential to be able to provide kvdb and sqldb
implementations for InvoiceDB.

* channeldb: restrict invoice tests to only use an InvoiceDB instance

* docs: update release notes for 0.18.0
2023-10-11 13:42:59 +02:00
positiveblue
5ff5225245
multi: break invoice depenency on channeldb
Now that we have the new package `lnd/channeldb/models` we can invert the
depenency between `channeldb` and `invoices`.

- Move all the invoice related types and errors to the
`invoices` package.

- Ensure that all the packages dealing with invoices use the types and
  interfaces defined in the `invoices` package.

- Implement the InvoiceDB interface (defined in `lnd/invoices`) in
  channeldb.

- Add new mock for InterfaceDB.

- `InvoiceRegistery` tests are now in its own subpacakge (they need to
  import both invoices & channeldb). This is temporary until we can
  decouple them.
2023-01-16 07:31:09 -08:00
Joost Jager
62ae0387ff
htlcswitch+invoices: log payment metadata 2022-04-13 22:55:42 +02:00
Conner Fromknecht
464dff09ac
invoices: expose AMPRecord() method on Payload 2021-03-03 16:26:39 -08:00
Joost Jager
8b5bb0ac63
record: move CustomRecordSet 2019-12-12 00:12:19 +01:00
Joost Jager
5f4bd136cd
invoices: store custom records in invoice database 2019-12-10 06:54:24 +01:00
Conner Fromknecht
9e9b912d3a
multi: replace NotifyExitHopHtlc eob param with hop.Payload 2019-11-04 15:10:32 -08:00