mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-09-19 20:15:18 +02:00
channeldb: add persistent invoice workflow
This commit adds the necessary database functionality required for a high-level payment invoice workflow. Invoices can be added dealing the requirements for fulfillment, looked by payment hash, and the finally also settled by payment hash. For record keeping and the possibility of reconciling future disputes, invoices are currently never deleted from disk. Instead when an invoice is settled a bit is toggled indicating as much. The current invoiceManger within the daemon will be modified to use this persistent invoice store, only storing certain “debug” invoices in memory as dictated by a command line flag.
This commit is contained in:
@@ -8,4 +8,7 @@ var (
|
||||
ErrNoActiveChannels = fmt.Errorf("no active channels exist")
|
||||
ErrChannelNoExist = fmt.Errorf("this channel does not exist")
|
||||
ErrNoPastDeltas = fmt.Errorf("channel has no recorded deltas")
|
||||
|
||||
ErrInvoiceNotFound = fmt.Errorf("unable to locate invoice")
|
||||
ErrDuplicateInvoice = fmt.Errorf("invoice with payment hash already exists")
|
||||
)
|
||||
|
Reference in New Issue
Block a user