mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-09-19 20:15:18 +02:00
channeldb: added channeldb versioning
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.
This commit is contained in:
committed by
Olaoluwa Osuntokun
parent
2bf5794645
commit
c53ea091dd
@@ -14,4 +14,5 @@ var (
|
||||
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")
|
||||
)
|
||||
|
Reference in New Issue
Block a user