From 19719cc81893d965b0c37cd7d276ed63bb667965 Mon Sep 17 00:00:00 2001 From: cgeek <cem.moreau@gmail.com> Date: Tue, 20 Nov 2018 18:08:44 +0100 Subject: [PATCH] [enh] Disable v11 for now --- app/lib/common-libs/constants.ts | 2 +- test/integration/branches/branches_revert2.ts | 7 +++++++ test/integration/certification/certification-replay.ts | 9 +++++++++ test/integration/fork-resolution/register-fork-blocks.ts | 6 ++++++ test/integration/membership_chainability.ts | 8 ++++++++ test/integration/wot/wotb.ts | 8 ++++++++ 6 files changed, 39 insertions(+), 1 deletion(-) diff --git a/app/lib/common-libs/constants.ts b/app/lib/common-libs/constants.ts index 5c44b5046..e2bd4cfb8 100755 --- a/app/lib/common-libs/constants.ts +++ b/app/lib/common-libs/constants.ts @@ -106,7 +106,7 @@ export const CommonConstants = { }, BLOCK_GENERATED_VERSION: 10, - BLOCK_NEW_GENERATED_VERSION: 11, + BLOCK_NEW_GENERATED_VERSION: 10, // Put it to 11 when ready LAST_VERSION_FOR_TX: 10, TRANSACTION_VERSION: 10, DOCUMENTS_VERSION: 10, diff --git a/test/integration/branches/branches_revert2.ts b/test/integration/branches/branches_revert2.ts index 6ac9b3778..0928ee375 100644 --- a/test/integration/branches/branches_revert2.ts +++ b/test/integration/branches/branches_revert2.ts @@ -18,6 +18,7 @@ import {Underscore} from "../../../app/lib/common-libs/underscore" import {ProverConstants} from "../../../app/modules/prover/lib/constants" import {shutDownEngine} from "../tools/shutdown-engine" import {expectAnswer, expectHttpCode, expectJSON} from "../tools/http-expect" +import {CommonConstants} from "../../../app/lib/common-libs/constants" const rp = require('request-promise'); @@ -42,6 +43,8 @@ describe("Revert two blocks", function() { before(async () => { + CommonConstants.BLOCK_NEW_GENERATED_VERSION = 11 + s1 = NewTestingServer( Underscore.extend({ name: 'bb11', @@ -286,4 +289,8 @@ describe("Revert two blocks", function() { }); }); }) + + after(() => { + CommonConstants.BLOCK_NEW_GENERATED_VERSION = 10 + }) }); diff --git a/test/integration/certification/certification-replay.ts b/test/integration/certification/certification-replay.ts index aee047c91..450eb99e8 100644 --- a/test/integration/certification/certification-replay.ts +++ b/test/integration/certification/certification-replay.ts @@ -14,6 +14,7 @@ import {assertEqual, writeBasicTestWithConfAnd2Users} from "../tools/test-framework" import {assertThrows} from "../../unit-tools" import {reduce} from "../../../app/lib/indexer" +import {CommonConstants} from "../../../app/lib/common-libs/constants" describe('Certification replay', () => writeBasicTestWithConfAnd2Users({ sigReplay: 3, @@ -21,6 +22,10 @@ describe('Certification replay', () => writeBasicTestWithConfAnd2Users({ sigValidity: 10, }, (test) => { + before(() => { + CommonConstants.BLOCK_NEW_GENERATED_VERSION = 11 + }) + const now = 1500000000 test('should be able to init with 2 blocks', async (s1, cat, tac) => { @@ -66,4 +71,8 @@ describe('Certification replay', () => writeBasicTestWithConfAnd2Users({ assertEqual(reduce(reducableFromCat).replayable_on, now + 4 + 3) // Replayable date should have changed! assertEqual(reduce(reducableFromCat).expires_on, now + 4 + 10) // The expiration date should have changed! (this is the interest of a replay) }) + + after(() => { + CommonConstants.BLOCK_NEW_GENERATED_VERSION = 10 + }) })) diff --git a/test/integration/fork-resolution/register-fork-blocks.ts b/test/integration/fork-resolution/register-fork-blocks.ts index 0fbe8deac..f74d1d9c1 100644 --- a/test/integration/fork-resolution/register-fork-blocks.ts +++ b/test/integration/fork-resolution/register-fork-blocks.ts @@ -28,6 +28,8 @@ describe("Fork blocks", function() { before(async () => { + CommonConstants.BLOCK_NEW_GENERATED_VERSION = 11 + s1 = NewTestingServer({ // The common conf @@ -231,4 +233,8 @@ describe("Fork blocks", function() { assert.equal(res.blocks[2].hash, 'C41F10519A24950C051F3ABBBF71775D9EF836374EF538897DFFF08E7A3F5E50') }) }) + + after(() => { + CommonConstants.BLOCK_NEW_GENERATED_VERSION = 11 + }) }) diff --git a/test/integration/membership_chainability.ts b/test/integration/membership_chainability.ts index d0e571a16..458f30349 100644 --- a/test/integration/membership_chainability.ts +++ b/test/integration/membership_chainability.ts @@ -45,11 +45,19 @@ describe("Membership chainability", function() { CommonConstants.BLOCK_NEW_GENERATED_VERSION = nowVersion }) + before(() => { + CommonConstants.BLOCK_NEW_GENERATED_VERSION = 11 + }) + it('current should be the 2nd', () => s1.expect('/blockchain/current', (res:any) => { res.should.have.property('number').equal(2) res.should.have.property('actives').length(1) })) + before(() => { + CommonConstants.BLOCK_NEW_GENERATED_VERSION = 10 + }) + after(async () => { await s1.closeCluster() }) diff --git a/test/integration/wot/wotb.ts b/test/integration/wot/wotb.ts index 4ace7d46a..b9acfcb24 100644 --- a/test/integration/wot/wotb.ts +++ b/test/integration/wot/wotb.ts @@ -17,6 +17,7 @@ import {BmaDependency} from "../../../app/modules/bma/index" import {WoTBInstance} from "../../../app/lib/wot" import {Underscore} from "../../../app/lib/common-libs/underscore" import {shutDownEngine} from "../tools/shutdown-engine" +import {CommonConstants} from "../../../app/lib/common-libs/constants" const should = require('should'); @@ -57,6 +58,9 @@ describe("WOTB module", () => { let wotb:WoTBInstance before(async () => { + + CommonConstants.BLOCK_NEW_GENERATED_VERSION = 11 + s1 = NewTestingServer( Underscore.extend({ name: 'bb11', @@ -446,5 +450,9 @@ describe("WOTB module", () => { wotb.existsLink(1, 2).should.equal(false); wotb.existsLink(2, 1).should.equal(false); }); + + after(() => { + CommonConstants.BLOCK_NEW_GENERATED_VERSION = 10 + }) }); }); -- GitLab