lnd: run invoice migration on startup

This commit runs the invoice migration if the user has a KV SQL backend
configured.
This commit is contained in:
Andras Banki-Horvath
2024-09-17 15:18:12 +02:00
parent 94e2724a34
commit 8d20e2a23b
5 changed files with 71 additions and 41 deletions

View File

@@ -87,6 +87,8 @@ type DB struct {
UseNativeSQL bool `long:"use-native-sql" description:"Use native SQL for tables that already support it."`
SkipSQLInvoiceMigration bool `long:"skip-sql-invoice-migration" description:"Do not migrate invoices stored in our key-value database to native SQL."`
NoGraphCache bool `long:"no-graph-cache" description:"Don't use the in-memory graph cache for path finding. Much slower but uses less RAM. Can only be used with a bolt database backend."`
PruneRevocation bool `long:"prune-revocation" description:"Run the optional migration that prunes the revocation logs to save disk space."`
@@ -115,7 +117,8 @@ func DefaultDB() *DB {
MaxConnections: defaultSqliteMaxConnections,
BusyTimeout: defaultSqliteBusyTimeout,
},
UseNativeSQL: false,
UseNativeSQL: false,
SkipSQLInvoiceMigration: false,
}
}