Merge branch 'master' into nymkappa/bugfix/missing-last-data-charts

This commit is contained in:
wiz authored and GitHub committed 2022-08-08 15:59:34 +09:00
commit 771d21e410
11 files changed
+55 -58

No files matched your search

@@ -430,10 +430,13 @@ class NetworkSyncService {
}
private toIntegerId(id: string): string {
if (config.LIGHTNING.BACKEND === 'lnd') {
if (config.LIGHTNING.BACKEND === 'cln') {
return convertChannelId(id);
}
else if (config.LIGHTNING.BACKEND === 'lnd') {
return id;
}
return convertChannelId(id);
return '';
}
/** Decodes a channel id returned by lnd as uint64 to a short channel id */
@@ -8,8 +8,8 @@ class LightningStatsUpdater {
public async $startService(): Promise<void> {
logger.info('Starting Lightning Stats service');
// LightningStatsImporter.$run();
this.$runTasks();
await this.$runTasks();
LightningStatsImporter.$run();
}
private setDateMidnight(date: Date): void {
@@ -34,7 +34,7 @@ class LightningStatsUpdater {
const date = new Date();
this.setDateMidnight(date);
logger.info(`Updating latest node stats`);
logger.info(`Updating latest networks stats`);
const networkGraph = await lightningApi.$getNetworkGraph();
LightningStatsImporter.computeNetworkStats(date.getTime() / 1000, networkGraph);
}