From 8ada2ac1654829f3ae91d104e5ddaaace26c9b05 Mon Sep 17 00:00:00 2001 From: boufni95 Date: Thu, 19 Feb 2026 21:45:31 +0000 Subject: [PATCH] new block handler logs --- src/services/main/index.ts | 2 ++ src/services/main/paymentManager.ts | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/services/main/index.ts b/src/services/main/index.ts index 965c2eba..9e90d2c2 100644 --- a/src/services/main/index.ts +++ b/src/services/main/index.ts @@ -161,6 +161,7 @@ export default class { NewBlockHandler = async (height: number, skipMetrics?: boolean) => { let confirmed: (PendingTx & { confs: number; })[] let log = getLogger({}) + log("NewBlockHandler called", JSON.stringify({ height, skipMetrics })) this.storage.paymentStorage.DeleteExpiredTransactionSwaps(height) .catch(err => log(ERROR, "failed to delete expired transaction swaps", err.message || err)) this.storage.paymentStorage.DeleteExpiredInvoiceSwaps(height) @@ -176,6 +177,7 @@ export default class { log(ERROR, "failed to check transactions after new block", err.message || err) return } + log("NewBlockHandler new confirmed transactions", confirmed.length) await Promise.all(confirmed.map(async c => { if (c.type === 'outgoing') { await this.storage.paymentStorage.UpdateUserTransactionPayment(c.tx.serial_id, { confs: c.confs }) diff --git a/src/services/main/paymentManager.ts b/src/services/main/paymentManager.ts index cb9b31cf..63999116 100644 --- a/src/services/main/paymentManager.ts +++ b/src/services/main/paymentManager.ts @@ -980,7 +980,8 @@ export default class { const pending = await this.storage.paymentStorage.GetPendingTransactions() let lowestHeight = height const map: Record = {} - + let log = getLogger({}) + log("CheckNewlyConfirmedTxs ", pending.incoming.length, "incoming", pending.outgoing.length, "outgoing") const checkTx = (t: PendingTx) => { if (t.tx.broadcast_height < lowestHeight) { lowestHeight = t.tx.broadcast_height } map[t.tx.tx_hash] = t