Don't try to import LN historical stats if no topology folder is set

This commit is contained in:
nymkappa 2022-12-28 12:13:41 +01:00
parent 04006b8c98
commit a975936d3c
No known key found for this signature in database
GPG key ID: E155910B16E8BD04

View file

@ -310,6 +310,11 @@ class LightningStatsImporter {
* Import topology files LN historical data into the database
*/
async $importHistoricalLightningStats(): Promise<void> {
if (!config.LIGHTNING.TOPOLOGY_FOLDER) {
logger.info(`Lightning topology folder is not set. Not importing historical LN stats`);
return;
}
logger.debug('Run the historical importer');
try {
let fileList: string[] = [];