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
This commit is contained in:
Vivek Teega 2021-04-12 15:04:07 +05:30
parent 452596702a
commit 861e908080

View File

@ -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;
};