mirror of
https://github.com/mempool/mempool.git
synced 2025-04-23 06:55:09 +02:00
Fix recursive call in LN network updater
This commit is contained in:
parent
e48eab403c
commit
7e356ef0a0
@ -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
|
||||
|
@ -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`);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user