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
commit 3b8dc89b53
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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();
}