Expose whether Lightning is enabled on the backend

This commit is contained in:
Felipe Knorr Kuhn 2023-01-10 21:54:34 -08:00
parent 5f87d6c4f1
commit 5379ec0f30
No known key found for this signature in database
GPG Key ID: 79619B52BB097C1A
2 changed files with 5 additions and 2 deletions

View File

@ -2,6 +2,7 @@ import fs from 'fs';
import path from 'path';
import os from 'os';
import { IBackendInfo } from '../mempool.interfaces';
import config from '../config';
class BackendInfo {
private backendInfo: IBackendInfo;
@ -22,7 +23,8 @@ class BackendInfo {
this.backendInfo = {
hostname: os.hostname(),
version: versionInfo.version,
gitCommit: versionInfo.gitCommit
gitCommit: versionInfo.gitCommit,
lightning: config.LIGHTNING.ENABLED
};
}

View File

@ -274,6 +274,7 @@ export interface IBackendInfo {
hostname: string;
gitCommit: string;
version: string;
lightning: boolean;
}
export interface IDifficultyAdjustment {
@ -337,4 +338,4 @@ export interface IOldestNodes {
updatedAt?: number,
city?: any,
country?: any,
}
}