Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
timothe
duniter
Commits
19719cc8
Commit
19719cc8
authored
Nov 20, 2018
by
Cédric Moreau
Browse files
[enh] Disable v11 for now
parent
3d54e3fd
Changes
6
Hide whitespace changes
Inline
Side-by-side
app/lib/common-libs/constants.ts
View file @
19719cc8
...
...
@@ -106,7 +106,7 @@ export const CommonConstants = {
},
BLOCK_GENERATED_VERSION
:
10
,
BLOCK_NEW_GENERATED_VERSION
:
1
1
,
BLOCK_NEW_GENERATED_VERSION
:
1
0
,
// Put it to 11 when ready
LAST_VERSION_FOR_TX
:
10
,
TRANSACTION_VERSION
:
10
,
DOCUMENTS_VERSION
:
10
,
...
...
test/integration/branches/branches_revert2.ts
View file @
19719cc8
...
...
@@ -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
})
});
test/integration/certification/certification-replay.ts
View file @
19719cc8
...
...
@@ -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
})
}))
test/integration/fork-resolution/register-fork-blocks.ts
View file @
19719cc8
...
...
@@ -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
})
})
test/integration/membership_chainability.ts
View file @
19719cc8
...
...
@@ -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
()
})
...
...
test/integration/wot/wotb.ts
View file @
19719cc8
...
...
@@ -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
})
});
});
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment