From 38c9562be8a2680d24f4d0ab6e654499a1a1779d Mon Sep 17 00:00:00 2001 From: kenshin-samourai Date: Fri, 5 Jul 2019 16:09:53 +0200 Subject: [PATCH] change the condition siwtching the startup mode of the tracker update the threshold for normal mode to 570,000 --- tracker/blockchain-processor.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/tracker/blockchain-processor.js b/tracker/blockchain-processor.js index e1266f7..a26a0cd 100644 --- a/tracker/blockchain-processor.js +++ b/tracker/blockchain-processor.js @@ -55,11 +55,9 @@ class BlockchainProcessor extends AbstractProcessor { * @returns {Promise} */ async catchup() { - // Get highest block in the blockchain - const info = await this.client.getblockchaininfo() - - // Consider that we are in IBD mode if bitcoind is far in the past - this.isIBD = info.initialblockdownload && (info.blocks < 550000) + // Consider that we are in IBD mode if Dojo is far in the past + const highest = await db.getHighestBlock() + this.isIBD = highest.blockHeight < 570000 if (this.isIBD) return this.catchupIBDMode()