mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-03-27 10:11:57 +01:00
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.
15 lines
449 B
Go
15 lines
449 B
Go
package channeldb
|
|
|
|
import "fmt"
|
|
|
|
var (
|
|
ErrNoChanDBExists = fmt.Errorf("channel db has not yet been created")
|
|
|
|
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")
|
|
)
|