fix
This commit is contained in:
parent
d328287132
commit
ffa038a439
2 changed files with 9 additions and 3 deletions
|
|
@ -24,7 +24,7 @@ export const initMainHandler = async (log: PubLogger, mainSettings: MainSettings
|
||||||
const sanityChecker = new SanityChecker(storageManager, mainHandler.lnd)
|
const sanityChecker = new SanityChecker(storageManager, mainHandler.lnd)
|
||||||
await sanityChecker.VerifyEventsLog()
|
await sanityChecker.VerifyEventsLog()
|
||||||
}
|
}
|
||||||
await mainHandler.paymentManager.watchDog.Start()
|
mainHandler.paymentManager.watchDog.Start()
|
||||||
const appsData = await mainHandler.storage.applicationStorage.GetApplications()
|
const appsData = await mainHandler.storage.applicationStorage.GetApplications()
|
||||||
const existingWalletApp = await appsData.find(app => app.name === 'wallet' || app.name === 'wallet-test')
|
const existingWalletApp = await appsData.find(app => app.name === 'wallet' || app.name === 'wallet-test')
|
||||||
if (!existingWalletApp) {
|
if (!existingWalletApp) {
|
||||||
|
|
|
||||||
|
|
@ -48,7 +48,7 @@ export class Watchdog {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.log("Provider did not become ready in time, starting without it")
|
this.log("Provider did not become ready in time, starting without it")
|
||||||
res('failed')
|
res('failed')
|
||||||
}, 60 * 1000)
|
}, 30 * 1000)
|
||||||
})
|
})
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|
@ -56,7 +56,13 @@ export class Watchdog {
|
||||||
if (result === 'ready') {
|
if (result === 'ready') {
|
||||||
providerBalance = await this.liquidProvider.GetLatestBalance()
|
providerBalance = await this.liquidProvider.GetLatestBalance()
|
||||||
}
|
}
|
||||||
await this.StartWatching(providerBalance)
|
try {
|
||||||
|
await this.StartWatching(providerBalance)
|
||||||
|
} catch (err: any) {
|
||||||
|
this.log("Failed to start watchdog", err.message || err)
|
||||||
|
throw err
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
StartWatching = async (providerBalance: number) => {
|
StartWatching = async (providerBalance: number) => {
|
||||||
this.log("Starting watchdog")
|
this.log("Starting watchdog")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue