This commit is contained in:
boufni95 2024-06-26 19:44:26 +02:00
parent d328287132
commit ffa038a439
2 changed files with 9 additions and 3 deletions

View file

@ -24,7 +24,7 @@ export const initMainHandler = async (log: PubLogger, mainSettings: MainSettings
const sanityChecker = new SanityChecker(storageManager, mainHandler.lnd)
await sanityChecker.VerifyEventsLog()
}
await mainHandler.paymentManager.watchDog.Start()
mainHandler.paymentManager.watchDog.Start()
const appsData = await mainHandler.storage.applicationStorage.GetApplications()
const existingWalletApp = await appsData.find(app => app.name === 'wallet' || app.name === 'wallet-test')
if (!existingWalletApp) {

View file

@ -48,7 +48,7 @@ export class Watchdog {
setTimeout(() => {
this.log("Provider did not become ready in time, starting without it")
res('failed')
}, 60 * 1000)
}, 30 * 1000)
})
])
@ -56,7 +56,13 @@ export class Watchdog {
if (result === 'ready') {
providerBalance = await this.liquidProvider.GetLatestBalance()
}
try {
await this.StartWatching(providerBalance)
} catch (err: any) {
this.log("Failed to start watchdog", err.message || err)
throw err
}
}
StartWatching = async (providerBalance: number) => {
this.log("Starting watchdog")