From 87170247bd237c2bc90eaf94e9333cd0e3201118 Mon Sep 17 00:00:00 2001 From: nymkappa Date: Fri, 11 Feb 2022 20:35:53 +0900 Subject: [PATCH] Revert "Merge pull request #1240 from nymkappa/feature/mempool-sync-threshold" This reverts commit 2f921f4cc73994cc9ea9c317c8897de0d1881340, reversing changes made to 877be47e5be03e31b25cc12fbe2ee45be881e5d8. --- backend/src/api/mempool.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/backend/src/api/mempool.ts b/backend/src/api/mempool.ts index 3a389c059..a8b0b461a 100644 --- a/backend/src/api/mempool.ts +++ b/backend/src/api/mempool.ts @@ -168,8 +168,7 @@ class Mempool { const newTransactionsStripped = newTransactions.map((tx) => Common.stripTransaction(tx)); this.latestTransactions = newTransactionsStripped.concat(this.latestTransactions).slice(0, 6); - const syncedThreshold = 0.99; // If we synced 99% of the mempool tx count, consider we're synced - if (!this.inSync && Object.keys(this.mempoolCache).length >= transactions.length * syncedThreshold) { + if (!this.inSync && transactions.length === Object.keys(this.mempoolCache).length) { this.inSync = true; logger.notice('The mempool is now in sync!'); loadingIndicators.setProgress('mempool', 100);