Merge pull request #322 from matiu/feat/testnet

Feat/testnet
This commit is contained in:
Ivan Socolsky 2015-06-16 16:38:52 -03:00
commit 48886dcd5c

View File

@ -254,8 +254,9 @@ HistoricSync.prototype.updateStartBlock = function(opts, next) {
var ret = false;
var d = Math.abs(height - blockInfo.height);
if (d > 6) {
error('Previous Tip block tip height differs by %d. Please delete and resync (-D)', d);
var limit = self.network == 'livenet' ? 6 : 100;
if (d > limit) {
error('Previous Tip block height differs by %d. Please delete and resync (-D)', d);
process.exit(1);
}
if (self.blockChainHeight === blockInfo.height ||