From 861e90808059d2ad1e2fd64c9e1c8f06897d4aad Mon Sep 17 00:00:00 2001 From: Vivek Teega Date: Mon, 12 Apr 2021 15:04:07 +0530 Subject: [PATCH] Change in reorg operation Reorg operation previously used to nuke 2000 block headers and redownload them from peers upon detecting a fork in the blockchain. Flosight has been crashing a lot because of this. We have updated the number of block headers to nuke to 20000 --- lib/services/header/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/services/header/index.js b/lib/services/header/index.js index d4e57dac..849f1a0d 100644 --- a/lib/services/header/index.js +++ b/lib/services/header/index.js @@ -25,12 +25,12 @@ var HeaderService = function(options) { this.subscriptions = {}; this.subscriptions.block = []; - this._checkpoint = options.checkpoint || 2000; // set to -1 to resync all headers. + this._checkpoint = options.checkpoint || 20000; // set to -1 to resync all headers. this.GENESIS_HASH = constants.BITCOIN_GENESIS_HASH[this.node.network]; this._lastHeader = null; this._initialSync = true; this._originalHeight = 0; - this._lastHeaderCount = 2000; + this._lastHeaderCount = 20000; this._slowMode = options.slowMode; };