aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/ark.ts1
-rw-r--r--lib/lightning.ts3
2 files changed, 4 insertions, 0 deletions
diff --git a/lib/ark.ts b/lib/ark.ts
index a37197e8..41515d54 100644
--- a/lib/ark.ts
+++ b/lib/ark.ts
@@ -59,6 +59,7 @@ const withTimeout = <T>(promise: Promise<T>, ms: number, label: string) =>
]);
export const refreshArkWallet = async (force = false) => {
+ if (!config.ark?.arkPrivateKey) return; // ark disabled
const now = Date.now();
if (refreshing || (!force && now - lastRefresh < REFRESH_COOLDOWN)) return;
try {
diff --git a/lib/lightning.ts b/lib/lightning.ts
index 9e259ed5..2f5f4f00 100644
--- a/lib/lightning.ts
+++ b/lib/lightning.ts
@@ -127,6 +127,9 @@ export async function listenForLightning() {
}
}
+// Watchdog (run periodically): restart a dead listener, or recycle a zombie one
+// that's been blocked in waitanyinvoice far past any normal quiet period while cl
+// is actually alive (the dead-listen-socket case).
export async function ensureListenerAlive() {
if (!listenerActive) {
warn("lightning listener: not active, restarting");