Commit 19719cc8 authored by Cédric Moreau's avatar Cédric Moreau
Browse files

[enh] Disable v11 for now

parent 3d54e3fd
......@@ -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,
......
......@@ -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
})
});
......@@ -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
})
}))
......@@ -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
})
})
......@@ -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()
})
......
......@@ -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
})
});
});
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment