Fix recursive call in LN network updater

This commit is contained in:
nymkappa 2022-08-11 16:51:09 +02:00
parent e48eab403c
commit 7e356ef0a0
No known key found for this signature in database
GPG Key ID: E155910B16E8BD04
2 changed files with 1 additions and 3 deletions

View File

@ -107,8 +107,6 @@ class NetworkSyncService {
} catch (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

View File

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