Skip to content

Commit

Permalink
move finished log inside try instead of finally
Browse files Browse the repository at this point in the history
  • Loading branch information
kajoseph committed Oct 31, 2024
1 parent 88f6389 commit 7813300
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/bitcore-node/src/services/pruning.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 ===========');
}
}

Expand Down Expand Up @@ -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 ===========');
}
}

Expand Down

0 comments on commit 7813300

Please sign in to comment.