From 01e8888e94ef40fce46492296d15954cabfbbd06 Mon Sep 17 00:00:00 2001 From: TheTrunk Date: Tue, 14 Jul 2020 14:51:33 +0200 Subject: [PATCH] stage 2 tests passed. introduce chain valid height bump to v66 --- ZelBack/config/default.js | 3 +++ ZelBack/src/services/explorerService.js | 4 ++-- package.json | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/ZelBack/config/default.js b/ZelBack/config/default.js index 953b8e25d..7d5ea0937 100644 --- a/ZelBack/config/default.js +++ b/ZelBack/config/default.js @@ -47,6 +47,9 @@ module.exports = { porttestnet: 26225, rpcporttestnet: 26224, }, + zelcash: { + chainValidHeight: 640000, + }, zelTeamZelId: '132hG26CFTNhLM3MRsLEJhp9DpBrK6vg5N', zelapps: { // in zel per month diff --git a/ZelBack/src/services/explorerService.js b/ZelBack/src/services/explorerService.js index 1bed3f2f5..b82501600 100644 --- a/ZelBack/src/services/explorerService.js +++ b/ZelBack/src/services/explorerService.js @@ -575,7 +575,7 @@ async function initiateBlockProcessor(restoreDatabase, deepRestore, reindexOrRes log.error('Error restoring database!'); throw e; } - } else if (scannedBlockHeight > 600000) { + } else if (scannedBlockHeight > config.zelcash.chainValidHeight) { const zelcashGetChainTips = await zelcashService.getChainTips(); if (zelcashGetChainTips.status !== 'success') { throw new Error(zelcashGetChainTips.data); @@ -946,7 +946,7 @@ async function reindexExplorer(req, res) { async function rescanExplorer(req, res) { try { const authorized = await serviceHelper.verifyPrivilege('zelteam', req); - if (true) { + if (authorized === true) { // since what blockheight let { blockheight } = req.params; // we accept both help/command and help?command=getinfo blockheight = blockheight || req.query.blockheight; diff --git a/package.json b/package.json index 505c570d4..f7c57084f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "zelflux", - "version": "0.65.4", + "version": "0.66.0", "description": "Flux - Node Daemon. The entrace to the Flux network.", "repository": { "type": "git",