From 781330027b977323354cef7b0f87985920923296 Mon Sep 17 00:00:00 2001 From: Kenny Joseph Date: Thu, 31 Oct 2024 15:44:32 -0400 Subject: [PATCH] move finished log inside try instead of finally --- packages/bitcore-node/src/services/pruning.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/bitcore-node/src/services/pruning.ts b/packages/bitcore-node/src/services/pruning.ts index 0048c8153f..58b100ff20 100644 --- a/packages/bitcore-node/src/services/pruning.ts +++ b/packages/bitcore-node/src/services/pruning.ts @@ -201,11 +201,11 @@ export class PruningService { }); logger.info(`Removed all pending ${chain}:${network} txs older than ${days} days: ${rmCount}`); this.lastRunTimeOld = Date.now(); + logger.info('========== OLD FINISHED ==========='); } catch (err: any) { logger.error(`Error processing old mempool txs: ${err.stack || err.message || err}`); } finally { this.runningOld = false; - logger.info('========== OLD FINISHED ==========='); } } @@ -263,11 +263,11 @@ export class PruningService { } logger.info(`Invalidated ${invalidCount} (processed ${realCount}) pending TXOs for ${chain}:${network}`); this.lastRunTimeInvalid = Date.now(); + logger.info('========== INVALID FINISHED ==========='); } catch (err: any) { logger.error(`Error processing invalid txs: ${err.stack || err.message || err}`); } finally { this.runningInvalid = false; - logger.info('========== INVALID FINISHED ==========='); } }