This commit is contained in:
boufni95 2024-06-26 19:27:32 +02:00
parent a42446d45a
commit d328287132

View file

@ -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')
}, 5000) }, 60 * 1000)
}) })
]) ])
@ -59,6 +59,7 @@ export class Watchdog {
await this.StartWatching(providerBalance) await this.StartWatching(providerBalance)
} }
StartWatching = async (providerBalance: number) => { StartWatching = async (providerBalance: number) => {
this.log("Starting watchdog")
this.startedAtUnix = Math.floor(Date.now() / 1000) this.startedAtUnix = Math.floor(Date.now() / 1000)
const totalUsersBalance = await this.storage.paymentStorage.GetTotalUsersBalance() const totalUsersBalance = await this.storage.paymentStorage.GetTotalUsersBalance()
this.initialLndBalance = await this.getTotalLndBalance(totalUsersBalance, providerBalance) this.initialLndBalance = await this.getTotalLndBalance(totalUsersBalance, providerBalance)