up
This commit is contained in:
parent
399a25ee02
commit
ff47eae1ba
2 changed files with 3 additions and 2 deletions
|
|
@ -50,6 +50,7 @@ export class ManagementManager {
|
|||
|
||||
private sendManageAuthorizationRequest = (appId: string, { requestId, npub }: { requestId: string, npub: string }) => {
|
||||
const message: Types.LiveManageRequest & { requestId: string, status: 'OK' } = { requestId: "GetLiveManageRequests", status: 'OK', npub: npub, request_id: requestId }
|
||||
this.logger("Sending manage authorization request to", npub, "for app", appId)
|
||||
this.nostrSend({ type: 'app', appId: appId }, { type: 'content', content: JSON.stringify(message), pub: npub })
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ export class Watchdog {
|
|||
const knownMaxIndex = paymentFound.length > 0 ? Math.max(paymentFound[0].paymentIndex, 0) : 0
|
||||
this.latestPaymentIndexOffset = await this.lnd.GetLatestPaymentIndex(knownMaxIndex)
|
||||
const other = { ilnd: this.initialLndBalance, hf: this.accumulatedHtlcFees, iu: this.initialUsersBalance, tu: totalUsersBalance, oext: otherExternal }
|
||||
getLogger({ component: 'watchdog_debug2' })(JSON.stringify({ deltaLnd: 0, deltaUsers: 0, totalExternal, latestIndex: this.latestPaymentIndexOffset, other }))
|
||||
//getLogger({ component: 'watchdog_debug2' })(JSON.stringify({ deltaLnd: 0, deltaUsers: 0, totalExternal, latestIndex: this.latestPaymentIndexOffset, other }))
|
||||
this.interval = setInterval(() => {
|
||||
if (this.latestCheckStart + (1000 * 58) < Date.now()) {
|
||||
this.PaymentRequested()
|
||||
|
|
@ -192,7 +192,7 @@ export class Watchdog {
|
|||
const newLatest = await this.lnd.GetLatestPaymentIndex(knownMaxIndex)
|
||||
const historyMismatch = newLatest > knownMaxIndex
|
||||
const other = { ilnd: this.initialLndBalance, hf: this.accumulatedHtlcFees, iu: this.initialUsersBalance, tu: totalUsersBalance, km: knownMaxIndex, nl: newLatest, oext: otherExternal }
|
||||
getLogger({ component: 'watchdog_debug2' })(JSON.stringify({ deltaLnd, deltaUsers, totalExternal, other }))
|
||||
//getLogger({ component: 'watchdog_debug2' })(JSON.stringify({ deltaLnd, deltaUsers, totalExternal, other }))
|
||||
const deny = await this.checkBalanceUpdate(deltaLnd, deltaUsers)
|
||||
if (historyMismatch) {
|
||||
getLogger({ component: 'bark' })("History mismatch detected in absolute update, locking outgoing operations")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue