mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-10-10 10:43:49 +02:00
channeldb: add NoMigration mode
In case the channeldb package is used as a library in external tools, it can be useful to allow read-only access to a DB. This allows such a tool to access a DB even if not all migrations were executed, which can be useful for recovery purposes. To make it possible to even start the DB with a read-only backend, we need to disable the automatic migration step.
This commit is contained in:
@@ -175,7 +175,7 @@ func makeTestGraph(useCache bool) (*channeldb.ChannelGraph, kvdb.Backend,
|
||||
graph, err := channeldb.NewChannelGraph(
|
||||
backend, opts.RejectCacheSize, opts.ChannelCacheSize,
|
||||
opts.BatchCommitInterval, opts.PreAllocCacheNumNodes,
|
||||
useCache,
|
||||
useCache, false,
|
||||
)
|
||||
if err != nil {
|
||||
cleanUp()
|
||||
|
Reference in New Issue
Block a user