Update backend/src/api/mempool.ts

Co-authored-by: mononaut <83316221+mononaut@users.noreply.github.com>
This commit is contained in:
softsimon
2023-07-02 18:10:08 +02:00
committed by GitHub
parent 1e83a99bae
commit 59713e2132

View File

@@ -180,9 +180,7 @@ class Mempool {
}
}
if (new Date().getTime() - start > 5_000) {
const progress = (currentMempoolSize + newTransactions.length) / transactions.length * 100;
logger.debug(`Mempool is synchronizing. Processed ${newTransactions.length}/${diff} txs (${Math.round(progress)}%)`);
if (Date.now() - intervalTimer > 5_000) {
if (this.inSync) {
// Break and restart mempool loop if we spend too much time processing