From d0f99b9daa8005411d694a9e23ebe25a74940b47 Mon Sep 17 00:00:00 2001 From: Matias Alejo Garcia Date: Tue, 16 Jun 2015 16:22:33 -0300 Subject: [PATCH 1/3] differnt limit for testnet --- lib/HistoricSync.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/HistoricSync.js b/lib/HistoricSync.js index 717d4cf..e7b7e0b 100644 --- a/lib/HistoricSync.js +++ b/lib/HistoricSync.js @@ -254,7 +254,8 @@ HistoricSync.prototype.updateStartBlock = function(opts, next) { var ret = false; var d = Math.abs(height - blockInfo.height); - if (d > 6) { + var limit = self.network == 'livenet' ? 6 : 60; + if (d > limit) { error('Previous Tip block tip height differs by %d. Please delete and resync (-D)', d); process.exit(1); } From 7c0e34e6c3ec63055b6d97bfd7b42a1b8ceb970b Mon Sep 17 00:00:00 2001 From: Matias Alejo Garcia Date: Tue, 16 Jun 2015 16:23:25 -0300 Subject: [PATCH 2/3] allow tip block to be "burried" with 100 blocks in testnet --- lib/HistoricSync.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/HistoricSync.js b/lib/HistoricSync.js index e7b7e0b..015a6ef 100644 --- a/lib/HistoricSync.js +++ b/lib/HistoricSync.js @@ -254,7 +254,7 @@ HistoricSync.prototype.updateStartBlock = function(opts, next) { var ret = false; var d = Math.abs(height - blockInfo.height); - var limit = self.network == 'livenet' ? 6 : 60; + var limit = self.network == 'livenet' ? 6 : 100; if (d > limit) { error('Previous Tip block tip height differs by %d. Please delete and resync (-D)', d); process.exit(1); From e67fe245f1457058b517868757ac8c6fc7311da8 Mon Sep 17 00:00:00 2001 From: Matias Alejo Garcia Date: Tue, 16 Jun 2015 16:27:35 -0300 Subject: [PATCH 3/3] fix msg --- lib/HistoricSync.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/HistoricSync.js b/lib/HistoricSync.js index 015a6ef..505ce4c 100644 --- a/lib/HistoricSync.js +++ b/lib/HistoricSync.js @@ -256,7 +256,7 @@ HistoricSync.prototype.updateStartBlock = function(opts, next) { var d = Math.abs(height - blockInfo.height); var limit = self.network == 'livenet' ? 6 : 100; if (d > limit) { - error('Previous Tip block tip height differs by %d. Please delete and resync (-D)', d); + error('Previous Tip block height differs by %d. Please delete and resync (-D)', d); process.exit(1); } if (self.blockChainHeight === blockInfo.height ||