fa70990452
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.
16 lines
520 B
Go
16 lines
520 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")
|
|
ErrNoInvoicesCreated = fmt.Errorf("there are no existing invoices")
|
|
ErrDuplicateInvoice = fmt.Errorf("invoice with payment hash already exists")
|
|
)
|