Merge branch 'master' into nymkappa/bugfix/missing-last-data-charts
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user