mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-09-19 20:15:18 +02:00
channeldb: store the invoice counter within the invoice index bucket
This commit moves the location of the invoice counter key which is an auto-incrementing primary key for all invoices. Rather than storing the counter in the same top-level invoice bucket, the counter is now stored within the invoiceIndex bucket. With this change, the top-level bucket can now cleanly be scanned in a sequential manner to retrieve all invoices.
This commit is contained in:
@@ -9,6 +9,7 @@ var (
|
||||
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")
|
||||
ErrInvoiceNotFound = fmt.Errorf("unable to locate invoice")
|
||||
ErrNoInvoicesCreated = fmt.Errorf("there are no existing invoices")
|
||||
ErrDuplicateInvoice = fmt.Errorf("invoice with payment hash already exists")
|
||||
)
|
||||
|
Reference in New Issue
Block a user