Merge pull request #2282 from mempool/nymkappa/bugfix/remove-extra-call-leak
Fix recursive call in LN network updater
This commit is contained in:
commit
6cba4a8492
@ -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
|
||||||
|
@ -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`);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user