Disable LN historical import if not mainnet

This commit is contained in:
nymkappa 2022-08-28 08:24:29 +02:00
parent f19978345e
commit 35de1d4d9a
No known key found for this signature in database
GPG Key ID: E155910B16E8BD04

View File

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