Merge pull request #2415 from mempool/nymkappa/bugfix/disable-ln-import-testsignet

Disable LN historical import if not mainnet
This commit is contained in:
wiz
2022-08-28 17:05:28 +02:00
committed by GitHub

View File

@@ -20,6 +20,10 @@ class LightningStatsImporter {
logger.info('Caching funding txs for currently existing channels');
await fundingTxFetcher.$fetchChannelsFundingTxs(channels.map(channel => channel.short_id));
if (config.MEMPOOL.NETWORK !== 'mainnet' || config.DATABASE.ENABLED === false) {
return;
}
await this.$importHistoricalLightningStats();
await this.$cleanupIncorrectSnapshot();
}