[esplora] fallback to tcp socket if unix socket fails

This commit is contained in:
nymkappa
2023-04-05 16:27:13 +09:00
parent 6c81dcdc76
commit 44a0913b81
2 changed files with 53 additions and 25 deletions

View File

@@ -38,6 +38,7 @@ interface IConfig {
ESPLORA: {
REST_API_URL: string;
UNIX_SOCKET_PATH: string | void | null;
RETRY_UNIX_SOCKET_AFTER: number;
};
LIGHTNING: {
ENABLED: boolean;
@@ -165,6 +166,7 @@ const defaults: IConfig = {
'ESPLORA': {
'REST_API_URL': 'http://127.0.0.1:3000',
'UNIX_SOCKET_PATH': null,
'RETRY_UNIX_SOCKET_AFTER': 30000,
},
'ELECTRUM': {
'HOST': '127.0.0.1',