c53ea091dd
In this commit the upgrade mechanism for database was added which makes he current schema rigid and upgradeable. Additional bucket 'metaBucket' was added which stores key that house meta-data related to the current/version state of the database. 'createChannelDB' was modified to create this new bucket+key during initializing. Also backup logic was added which makes a complete copy of the current database during migration process and restore the previous version of database if migration failed.
19 lines
664 B
Go
19 lines
664 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")
|
|
|
|
ErrNodeNotFound = fmt.Errorf("link node with target identity not found")
|
|
ErrMetaNotFound = fmt.Errorf("unable to locate meta information")
|
|
)
|