diff --git a/app/lib/common-libs/constants.ts b/app/lib/common-libs/constants.ts index 5c44b5046097754c4d223eb2e7958060eb3e7433..e2bd4cfb89ac4332c041af52e3ebf90d39f0d689 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 6ac9b377875b159d2c692f36864eb9ef0f821702..0928ee375d004cd53498481e5bf4845821e2c30d 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 aee047c9103173bd192f79e4394c32b968b65ac0..450eb99e88cf2e07432ba62993eac01dd4bd5aef 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 0fbe8deacebc7e1858a27f2ebc0da52dca270f69..f74d1d9c10a5f00faafc3e8a8a4c423896759253 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 d0e571a165387a1b6d6d61e2d5b8ed23bdbb3364..458f30349d4305c079e34e1a56ca9868091a6c46 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 4ace7d46a3d0cbc56d57d649262bec5b47e1be4f..b9acfcb24873c5d2f2fcf35c33d0862606ce8ab5 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 + }) }); });