Merge pull request #2282 from mempool/nymkappa/bugfix/remove-extra-call-leak

Fix recursive call in LN network updater
This commit is contained in:
wiz 2022-08-12 13:46:39 +09:00 committed by GitHub
commit 6cba4a8492
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 3 deletions

View File

@ -107,8 +107,6 @@ class NetworkSyncService {
} catch (e) { } catch (e) {
logger.err(`Cannot update channel list. Reason: ${(e instanceof Error ? e.message : e)}`); logger.err(`Cannot update channel list. Reason: ${(e instanceof Error ? e.message : e)}`);
} }
setTimeout(() => { this.$runTasks(); }, 1000 * config.LIGHTNING.STATS_REFRESH_INTERVAL);
} }
// This method look up the creation date of the earliest channel of the node // This method look up the creation date of the earliest channel of the node

View File

@ -25,7 +25,7 @@ class LightningStatsUpdater {
const date = new Date(); const date = new Date();
Common.setDateMidnight(date); Common.setDateMidnight(date);
const networkGraph = await lightningApi.$getNetworkGraph(); const networkGraph = await lightningApi.$getNetworkGraph();
LightningStatsImporter.computeNetworkStats(date.getTime() / 1000, networkGraph); await LightningStatsImporter.computeNetworkStats(date.getTime() / 1000, networkGraph);
logger.info(`Updated latest network stats`); logger.info(`Updated latest network stats`);
} }